lkml.org 
[lkml]   [2008]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] RCU: Move some definitions to minimal headers.

* 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


\
 
 \ /
  Last update: 2008-12-29 15:59    [W:0.110 / U:1.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site