All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Jaswinder Singh Rajput <jaswinderrajput@gmail.com>,
	randy.dunlap@oracle.com, linux-kernel@vger.kernel.org,
	x86@kernel.org, Andrea Righi <righi.andrea@gmail.com>
Subject: Re: mmotm 2009-02-02-17-12 uploaded (x86/nopmd etc.)
Date: Wed, 4 Feb 2009 20:56:12 +0100	[thread overview]
Message-ID: <20090204195612.GE22608@elte.hu> (raw)
In-Reply-To: <4988C73F.2070707@goop.org>


* Jeremy Fitzhardinge <jeremy@goop.org> wrote:

> Ingo Molnar wrote:
>> the include file spaghetti is ... interesting there, and it's historic.
>>
>> I could blame it on highmem, PAE or paravirt - but i'll only blame it 
>> on paravirt for now because those developers are still around! ;-)
>>   
>
> Hey, don't forget unification, if we're pointing fingers ;)

Unification only moved stupidly separate crap closer to each other, making 
them all stink much more intensely. I consider that a feature! :)

>> Jeremy, any ideas how to reduce the historic dependency mess in that 
>> area? I think we should go on three routes at once:
>>
>>  - agressive splitup and separation of type definitions from method
>>    declaration (+ inline definitions). The spinlock_types.h / 
>> spinlock.h    splitup was really nice in solving such dependency 
>> problems.
>>   
>
> That already exists to some extent, though I don't think it's being used 
> to maximum advantage (pgtable-[23]level.h vs pgtable-[23]level-defs.h).  
> For consistency we'd have pgtable-4level(-defs).h headers too, and 
> top-level pgtable.h/pgtable-defs.h headers.  But its not clear to me that 
> would even be enough...

>>  - uninlining of methods: instead of macro-ing them - wherever 
>> possible.    It's really hard to mess up type + externs headers - while 
>> headers with    inlines and macros mixed in get painful quickly.
>>   
>
> Yes.  I went through a period of fairly aggressive inline->macro  
> conversion, and in many cases the remaining macros are there to #include  
> hell.
>
>>  - removal of spurious pile of dozens of #include lines in header files.
>
> Yeah, it would be useful to make sure that each header only #includes  
> the bare minimum headers to satisfy its own definitions - but of course  
> that's going to provoke a long series of #include whack-a-mole patches.

If you worry about the fallout, that's not a problem really. I'd expect most 
of the fixlets to go into .c files that used insufficient list of includes 
and relied on some previously existing spaghetti side-effect.

I even volunteer to whack them all myself, if you provide a large series of 
base patches that:

 1) happen to build and boot on any one of your favorite configs

 2) produce a squeaky clean .h file layout and dependency structure.

Doing a ping-pong with you of breakage+fixlet cycles wont scale too well, 
even with the very fast -tip turnaround. We could easily end up having to do 
dozens of followup fixes.

But it should be _really_ radical and the end result should be _really_ 
clean, to make the effort _really_ worth it :-)

	Ingo

  reply	other threads:[~2009-02-04 19:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03  1:12 mmotm 2009-02-02-17-12 uploaded akpm
2009-02-03 18:58 ` mmotm 2009-02-02-17-12 uploaded (x86/nopmd etc.) Randy Dunlap
2009-02-03 19:18   ` Ingo Molnar
2009-02-03 20:17     ` Andrew Morton
2009-02-03 21:25       ` Ingo Molnar
2009-02-03 21:41         ` Andrew Morton
2009-02-04 20:08           ` Ingo Molnar
2009-02-04 21:25             ` Andrew Morton
2009-02-04 21:29               ` Ingo Molnar
2009-02-04 21:32               ` Andrea Righi
2009-02-03 22:37         ` Jeremy Fitzhardinge
2009-02-04 19:56           ` Ingo Molnar [this message]
2009-02-03 22:13 ` [PATCH] sunrpc: fix rdma dependencies Randy Dunlap
2009-02-03 23:20   ` David Miller

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=20090204195612.GE22608@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=jaswinderrajput@gmail.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=righi.andrea@gmail.com \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.