All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Andrew Morton <akpm@osdl.org>
Cc: ebiederm@xmission.com, bunk@stusta.de,
	linux-kernel@vger.kernel.org, rdunlap@xenotime.net,
	fastboot@osdl.org
Subject: Re: 2.6.17-rc1-mm1: KEXEC became SMP-only
Date: Tue, 04 Apr 2006 15:34:17 -0700	[thread overview]
Message-ID: <4432F469.1040405@vmware.com> (raw)
In-Reply-To: <20060404151904.764ad9f4.akpm@osdl.org>

Andrew Morton wrote:
> Zachary Amsden <zach@vmware.com> wrote:
>   
>> Andrew Morton wrote:
>>     
>>>>  struct subarch_hooks subarch_hook_vector = {
>>>>       .machine_power_off = machine_power_off,
>>>>       .machine_halt = machine_halt,
>>>>       .machine_irq_setup = machine_irq_setup,
>>>>       .machine_subarch_setup = machine_subarch_probe
>>>>       ...
>>>>  };
>>>>
>>>>  And machine_subarch_probe can dynamically change this vector if it 
>>>>  confirms that the platform is appropriate?
>>>>     
>>>>         
>>> I don't recall anyone expressing any desire for the ability to set these
>>> things at runtime.  Unless there is such a requirement I'd suggest that the
>>> best way to address Eric's point is to simply rename the relevant functions
>>> from foo() to subarch_foo().
>>>   
>>>       
>> Avoiding the runtime assignment isn't possible if you want a generic 
>> subarch that truly can run on multiple different platforms.
>>     
>
> Well as I said - I haven't seen any requirement for this expressed.  That
> doesn't mean that such a requirements doesn't exist, of course.
>
>   
>> I prefer runtime assignment not for this reason, but simply because it 
>> also eliminates two artifacts:
>>
>> 1) You can add new subarch hooks without breaking every other 
>> sub-architecture
>>     
>
> Is that useful?   If you need a new subarch_bar() then
>
> a) Implement it in the subarch which needs it
> b) Implement an attribute(weak) stub in a new subarch-stubs.c
> c) call it.
>
> That's a little more costly than a static inline stub, but not much.  Are
> there likely to be any subarch calls which are a) called frequently and b)
> not required on some subarchs?
>   

No, most of these are one time init calls.  The problem before was the 
default subarch couldn't define weak symbols, since setup.c was in the 
subarch itself and not in arch/i386/kernel.  Do weak symbols work with 
all tool chains?

>   
>> 2) You don't need #ifdef SUBARCH_FUNC_FOO goo to do this (renaming 
>> voyager_halt -> default)
>>     
>
> Why would one need that?  Isn't it simply a matter of renaming
> machine_halt() to subarch_machine_halt() everywhere?
>   

No - if you rename machine_halt to subarch_machine_halt, you again can't 
add a new subarch interface without changing all subarchitectures.  If I 
add voyager_smp_bless_voyage(), I now need to add #define 
visws_smp_bless_voyage default_smp_bless_voyage, ... or did you mean 
subarch_machine_halt literally?

> I'm just looking for the simplest option here.  Eric has identified a code
> maintainability problem - it'd be good to fix that, but we shouldn't add
> runtime cost/complexity unless we actually gain something from it.
>   

I think weak symbols are the best approach, if they indeed work with all 
tool chains.

Zach

  reply	other threads:[~2006-04-04 22:34 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-04  8:45 2.6.17-rc1-mm1 Andrew Morton
2006-04-04 14:31 ` 2.6.17-rc1-mm1 Kumar Gala
2006-04-04 16:02 ` 2.6.17-mm1: drivers/w1/: patch undoes reasonable cleanups Adrian Bunk
2006-04-04 16:35   ` Evgeniy Polyakov
2006-04-04 16:29 ` 2.6.17-rc1-mm1: KEXEC became SMP-only Adrian Bunk
2006-04-04 17:22   ` Zachary Amsden
2006-04-04 17:50     ` Eric W. Biederman
2006-04-06 22:37     ` Adrian Bunk
2006-04-04 17:43   ` Eric W. Biederman
2006-04-04 17:51     ` Zachary Amsden
2006-04-04 18:43       ` Eric W. Biederman
2006-04-04 19:23         ` Zachary Amsden
2006-04-04 19:38           ` Muli Ben-Yehuda
2006-04-04 20:25           ` Andrew Morton
2006-04-04 22:02             ` Zachary Amsden
2006-04-04 22:19               ` Andrew Morton
2006-04-04 22:34                 ` Zachary Amsden [this message]
2006-04-04 22:38                   ` Andrew Morton
2006-04-05  0:21                 ` Martin Bligh
2006-04-05  2:45                   ` Eric W. Biederman
2006-04-04 16:29 ` [-mm patch] i386: pre_intr_init_hook optimization Adrian Bunk
2006-04-04 17:16   ` Zachary Amsden
2006-04-04 16:29 ` 2.6.17-rc1-mm1: why did acpi_ns_build_external_path() become global? Adrian Bunk
2006-04-04 16:30 ` [-mm patch] drivers/media/video/bt866.c: small fixes Adrian Bunk
2006-04-04 18:32   ` Martin Samuelsson
2006-04-05  7:42     ` Andrew Morton
2006-04-05  9:02       ` Adrian Bunk
2006-04-05 13:44       ` Martin Samuelsson
2006-04-05  8:32     ` Johannes Stezenbach
2006-04-05 13:54       ` Martin Samuelsson
2006-04-04 16:30 ` [-mm patch] fs/nfsd/nfs4state.c: make a struct static Adrian Bunk
2006-04-04 16:30   ` Adrian Bunk
2006-04-04 16:50   ` [NFS] " J. Bruce Fields
2006-04-04 17:29     ` Adrian Bunk
2006-04-04 20:53 ` 2.6.17-rc1-mm1: mlockall() regression on x86_64 Rafael J. Wysocki
2006-04-04 22:24   ` Andrew Morton
2006-04-04 21:53 ` 2.6.17-rc1-mm1 Zan Lynx
2006-04-04 22:09   ` 2.6.17-rc1-mm1 Andrew Morton
2006-04-05  7:01     ` 2.6.17-rc1-mm1 Roger Luethi
2006-04-05  7:29       ` 2.6.17-rc1-mm1 Andrew Morton
2006-04-05 22:01         ` 2.6.17-rc1-mm1 Roger Luethi
2006-04-04 23:38 ` 2.6.17-rc1-mm1 Luck, Tony
2006-04-04 23:38   ` 2.6.17-rc1-mm1 Luck, Tony
2006-04-05  2:05   ` 2.6.17-rc1-mm1 Zou Nan hai
2006-04-05  2:05     ` 2.6.17-rc1-mm1 Zou Nan hai
2006-04-05 16:15     ` 2.6.17-rc1-mm1 Bjorn Helgaas
2006-04-05 16:15       ` 2.6.17-rc1-mm1 Bjorn Helgaas
2006-04-05 21:17       ` 2.6.17-rc1-mm1 Luck, Tony
2006-04-05 21:17         ` 2.6.17-rc1-mm1 Luck, Tony
2006-04-05 21:37         ` 2.6.17-rc1-mm1 Andrew Morton
2006-04-05 21:37           ` 2.6.17-rc1-mm1 Andrew Morton
2006-04-05 21:39         ` 2.6.17-rc1-mm1 Andreas Schwab
2006-04-05 21:39           ` 2.6.17-rc1-mm1 Andreas Schwab
2006-04-05 22:01         ` 2.6.17-rc1-mm1 Bjorn Helgaas
2006-04-05 22:01           ` 2.6.17-rc1-mm1 Bjorn Helgaas
2006-04-06  1:49           ` 2.6.17-rc1-mm1 Antonino A. Daplas
2006-04-06  1:49             ` 2.6.17-rc1-mm1 Antonino A. Daplas
2006-04-06 10:21           ` 2.6.17-rc1-mm1 Russell King
2006-04-06 10:21             ` 2.6.17-rc1-mm1 Russell King
2006-04-06 10:34             ` 2.6.17-rc1-mm1 Russell King
2006-04-06 10:34               ` 2.6.17-rc1-mm1 Russell King
2006-04-06 14:55               ` 2.6.17-rc1-mm1 Bjorn Helgaas
2006-04-06 14:55                 ` 2.6.17-rc1-mm1 Bjorn Helgaas
2006-04-06 10:16         ` 2.6.17-rc1-mm1 Russell King
2006-04-06 10:16           ` 2.6.17-rc1-mm1 Russell King
2006-04-05 22:50   ` 2.6.17-rc1-mm1 Luck, Tony
2006-04-05 22:50     ` 2.6.17-rc1-mm1 Luck, Tony
2006-04-05  2:27 ` 2.6.17-rc1-mm1, nfsd/reiser4 BUG Zan Lynx
2006-04-07 12:27 ` 2.6.17-rc1-mm1: drivers/acpi/numa.c compile error Adrian Bunk
2006-04-07 20:59   ` Andrew Morton
2006-04-09 15:44     ` Adrian Bunk
2006-04-09 15:57       ` Randy.Dunlap
2006-04-07 20:58 ` 2.6.17-rc1-mm1 - detects buggy TSC on GEODE Jim Cromie
2006-04-08  0:07   ` Andrew Morton
2006-04-08  0:25     ` john stultz
2006-04-08  1:15     ` Jim Cromie
2006-04-13  7:39 ` 2.6.17-rc1-mm1 Heiko Carstens
2006-04-13  8:13   ` 2.6.17-rc1-mm1 Andrew Morton
2006-04-14 16:07     ` 2.6.17-rc1-mm1 Alasdair G Kergon

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=4432F469.1040405@vmware.com \
    --to=zach@vmware.com \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=ebiederm@xmission.com \
    --cc=fastboot@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /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.