linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: David Howells <dhowells@redhat.com>
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	arnd@arndb.de, tglx@linutronix.de, mingo@kernel.org,
	davej@redhat.com
Subject: Re: [PATCH 00/13] UAPI header file split
Date: Thu, 2 Aug 2012 17:15:30 -0700	[thread overview]
Message-ID: <20120803001530.GC8250@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120720215636.14854.41208.stgit@warthog.procyon.org.uk>

On Fri, Jul 20, 2012 at 10:56:37PM +0100, David Howells wrote:
> 
> Here's the second installment of patches from step 1 of my plan below to clean
> up the kernel header files and sort out the inclusion recursion problems.
> 
> Note that these patches will need regenerating if the header files they alter
> change before they're applied.  However, the disintegration is scripted, so
> that just takes a few minutes normally.
> 
> 
> ===================================
> BACKGROUND ON THE RECURSION PROBLEM
> ===================================
> 
> I occasionally run into a problem where I can't write an inline function in a
> header file because I need to access something from another header that
> includes this one.  Due to this, I end up writing it as a #define instead.
> 
> The problems are mainly due to inline functions.  If we split some headers
> (linux/sched.h being the biggest culprit) to separate the inline functions from
> the data structs (e.g. task_struct) then we could reduce the problems.  Other
> splits and rearrangements could help also.
> 
> Quite often it's a case of an inline function in header A wanting a struct[*]
> from header B, but header B already has an inline function that wants a struct
> from header A.
> 
> 	[*] or constant or whatever.
> 
> In the past someone tried to add a kernel-offsets file (an analogue to
> asm-offsets) to deal with the problems of dealing with both linux/rcupdate.h
> and linux/sched.h - each header needed to be included before the other.

Indeed, and later attempts to work around this problem using per-CPU
variables did not go well either.  This separation should allow
__rcu_read_lock() to be inlined for PREEMPT=y kernels, which would be
quite nice.

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

      parent reply	other threads:[~2012-08-03  0:16 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 21:56 [PATCH 00/13] UAPI header file split David Howells
2012-07-20 21:56 ` [PATCH 01/13] UAPI: Refer to the DRM UAPI headers with <...> and from certain headers only David Howells
2012-07-20 21:56   ` David Howells
2012-07-20 21:57 ` [PATCH 02/13] UAPI: (Scripted) Remove redundant DRM UAPI header #inclusions from drivers/gpu/ David Howells
2012-07-20 21:57   ` David Howells
2012-07-20 21:57 ` [PATCH 03/13] UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ David Howells
2012-07-20 21:57 ` [PATCH 04/13] UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers David Howells
2012-07-20 21:57   ` David Howells
2012-07-20 21:57 ` [PATCH 05/13] UAPI: Partition the header include path sets and add uapi/ header directories David Howells
2012-07-20 21:57   ` David Howells
2012-07-20 21:57 ` [PATCH 06/13] UAPI: (Scripted) Set up UAPI Kbuild files David Howells
2012-07-20 21:57   ` David Howells
2012-07-20 21:58 ` [PATCH 07/13] UAPI: x86: Fix the test_get_len tool David Howells
2012-07-20 21:58   ` David Howells
2012-07-20 21:58 ` [PATCH 08/13] UAPI: x86: Fix insn_sanity build failure after UAPI split David Howells
2012-07-20 21:58   ` David Howells
2012-07-20 21:58 ` [PATCH 09/13] UAPI: Set up uapi/asm/Kbuild.asm David Howells
2012-07-20 21:58   ` David Howells
2012-07-20 21:58 ` [PATCH 10/13] UAPI: Move linux/version.h David Howells
2012-07-20 21:58   ` David Howells
2012-07-20 21:58 ` [PATCH 11/13] UAPI: Remove the objhdr-y export list David Howells
2012-07-20 21:58   ` David Howells
2012-07-20 21:58 ` [PATCH 12/13] UAPI: x86: Differentiate the generated UAPI and internal headers David Howells
2012-07-20 21:58   ` David Howells
2012-07-20 21:59 ` [PATCH 13/13] UAPI: Plumb the UAPI Kbuilds into the user header installation and checking David Howells
2012-07-20 21:59   ` David Howells
2012-07-21  9:41 ` [PATCH 05/13] UAPI: Partition the header include path sets and add uapi/ header directories David Howells
2012-07-21 10:13 ` David Howells
2012-07-23 15:50 ` [PATCH 00/13] UAPI header file split Arnd Bergmann
2012-07-24 12:48 ` Michael Kerrisk
2012-07-24 13:19 ` David Howells
2012-07-24 13:19   ` David Howells
2012-07-25  7:48   ` Michael Kerrisk
2012-07-25 10:23   ` David Howells
2012-07-25 11:01     ` Michael Kerrisk
2012-07-25 11:20     ` David Howells
2012-07-26 13:18       ` Michael Kerrisk
2012-07-26 14:32       ` David Howells
2012-07-26 14:35         ` Michael Kerrisk
2012-07-26 15:22         ` David Howells
2012-07-25 17:32     ` David Howells
2012-07-25 19:21     ` David Howells
2012-07-26 10:17       ` Michael Kerrisk
2012-07-26 10:46       ` David Howells
2012-07-27  7:07         ` Michael Kerrisk
2012-07-26 10:46       ` David Howells
2012-07-26 13:29         ` Michael Kerrisk
2012-07-25 20:06     ` David Howells
2012-07-25 20:09     ` David Howells
2012-07-25 20:09       ` David Howells
2012-08-03  0:15 ` Paul E. McKenney [this message]

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=20120803001530.GC8250@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=arnd@arndb.de \
    --cc=davej@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).