mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
	Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
	Dipankar Sarma <dipankar@in.ibm.com>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] RCU: Move some definitions to minimal headers.
Date: Mon, 29 Dec 2008 15:56:30 +0100	[thread overview]
Message-ID: <20081229145630.GB16205@elte.hu> (raw)
In-Reply-To: <01504e3763e57759f34045051e86cb35c17b43b5.1230499486.git.eduard.munteanu@linux360.ro>


* Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> wrote:

> linux/rcupdate.h used to include SLAB headers, which got in the way of 
> switching kmemtrace to use tracepoints instead of markers. The circular 
> header inclusion pattern that appeared was making it impossible to use 
> tracepoints in SLAB allocator inlines.
> 
> This moves some header code into separate files. As an added bonus, 
> preprocessing is faster if care is taken to use these minimal headers, 
> since no effort is spent on including SLAB headers.
> 
> Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
> ---
>  include/linux/rcuclassic.h     |   40 +--------
>  include/linux/rcuclassic_min.h |   77 +++++++++++++++
>  include/linux/rcupdate.h       |  160 +-------------------------------
>  include/linux/rcupdate_min.h   |  205 ++++++++++++++++++++++++++++++++++++++++
>  include/linux/rcupreempt.h     |   32 +------
>  include/linux/rcupreempt_min.h |   68 +++++++++++++
>  6 files changed, 353 insertions(+), 229 deletions(-)
>  create mode 100644 include/linux/rcuclassic_min.h
>  create mode 100644 include/linux/rcupdate_min.h
>  create mode 100644 include/linux/rcupreempt_min.h

ok, i like the idea - i'm just not sure this is the best approach. If we 
want to do a splitup, it should be along the lines of spinlock.h and 
spinlock_types.h.

The principle there is that the type declarations and inline function 
definitions kept separate. The 'type' headers are lightweight with minimal 
dependencies - the 'inline function' headers are more heavyweight.

For RCU ... cannot we get away much simpler, by removing the headers from 
rcupdate.h that cause the SLAB dependency hell? Does rcupdate.h really 
need to include all of:

 #include <linux/cache.h>
 #include <linux/spinlock.h>
 #include <linux/threads.h>
 #include <linux/percpu.h>
 #include <linux/cpumask.h>
 #include <linux/seqlock.h>
 #include <linux/lockdep.h>
 #include <linux/completion.h>

AFAICS it should be able to get away with spinlock_types.h and i'm not 
sure it needs cache.h. The other headers are 'data type' headers mostly.

Which one is causing the trouble for you - cache.h ? If you do a patch 
that removes that trouble include file i can make wide build coverage 
tests to make sure it's OK to remove it.

but rcu_types.h would be nice to have too - i'm just not sure it's really 
what you need. (you seem to need certain RCU functions too, right?)

	Ingo

  parent reply	other threads:[~2008-12-29 14:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-29  1:40 [PATCH 0/3] kmemtrace over tracepoints Eduard - Gabriel Munteanu
2008-12-29  1:40 ` [PATCH 1/3] RCU: Move some definitions to minimal headers Eduard - Gabriel Munteanu
2008-12-29  1:40   ` [PATCH 2/3] tracepoints: Include only minimal RCU headers in linux/tracepoint.h Eduard - Gabriel Munteanu
2008-12-29  1:40     ` [PATCH 3/3] kmemtrace: Use tracepoints instead of markers Eduard - Gabriel Munteanu
2008-12-29  9:44       ` Pekka Enberg
2009-01-02 20:54         ` Mathieu Desnoyers
2009-01-02 23:03           ` Eduard - Gabriel Munteanu
2008-12-29 13:43       ` Pekka Enberg
2008-12-29 20:11         ` Eduard - Gabriel Munteanu
2009-01-02 20:53       ` Mathieu Desnoyers
2009-01-02 23:01         ` Eduard - Gabriel Munteanu
2009-01-02 23:42           ` Mathieu Desnoyers
2009-01-04  1:53             ` Eduard - Gabriel Munteanu
2009-01-04  4:10             ` Eduard - Gabriel Munteanu
2009-01-05 16:05               ` Mathieu Desnoyers
2009-01-05 17:57                 ` Eduard - Gabriel Munteanu
2009-01-05 18:09                   ` Mathieu Desnoyers
2008-12-29  9:42   ` [PATCH 1/3] RCU: Move some definitions to minimal headers Pekka Enberg
2008-12-29 12:32     ` Ingo Molnar
2008-12-30  6:31     ` Paul E. McKenney
2008-12-29 14:56   ` Ingo Molnar [this message]
2008-12-29  9:41 ` [PATCH 0/3] kmemtrace over tracepoints Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081229145630.GB16205@elte.hu \
    --to=mingo@elte.hu \
    --cc=adobriyan@gmail.com \
    --cc=dipankar@in.ibm.com \
    --cc=eduard.munteanu@linux360.ro \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=penberg@cs.helsinki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®