public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Max Krasnyansky <maxk@qualcomm.com>
To: Paul Jackson <pj@sgi.com>
Cc: mingo@elte.hu, a.p.zijlstra@chello.nl,
	linux-kernel@vger.kernel.org, menage@google.com,
	rostedt@goodmis.org
Subject: Re: [PATCH] sched: Move cpu masks from kernel/sched.c into kernel/cpu.c
Date: Thu, 29 May 2008 21:08:35 -0700	[thread overview]
Message-ID: <483F7DC3.9080705@qualcomm.com> (raw)
In-Reply-To: <20080529182634.e9146033.pj@sgi.com>



Paul Jackson wrote:
> Max wrote:
>> kernel/cpu.c is now built for the UP kernel too, but it does not
>> affect the size the kernel sections.
> 
> I don't think this is possible.  It must affect the size.
> 
> The patch moves kernel/cpu.o from being included only if CONFIG_SMP,
> to being included always:
> 
>      obj-y     = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
>     -	    exit.o itimer.o time.o softirq.o resource.o \
>     +	    cpu.o exit.o itimer.o time.o softirq.o resource.o \
> 		sysctl.o capability.o ptrace.o timer.o user.o \
> 		signal.o sys.o kmod.o workqueue.o pid.o \
> 		rcupdate.o extable.o params.o posix-timers.o \
>     @@ -27,7 +27,7 @@ obj-$(CONFIG_RT_MUTEXES) += rtmutex.o
>      obj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o
>      obj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o
>      obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
>     -obj-$(CONFIG_SMP) += cpu.o spinlock.o
>     +obj-$(CONFIG_SMP) += spinlock.o
> 
> The kernel/cpu.o object file is non-empty; it has size,
> perhaps 1 or 2 kbytes of text, and a little bit of data.
> 
> So adding it to builds which disabled SMP must add to the
> size of the resultant kernel, by my thinking anyway.

All the code is ifdefed under CONFIG_SMP. So there is no code in the !SMP
case, just three masks. When you mentioned it first time I went back and
rebuilt the !SMP kernel with and without the patch. Luckily I have a
ridiculously fast 8way box here so I went ahead and verified it again.

Before:
size vmlinux
   text	   data	    bss	    dec	    hex	filename
3305622	 306420	 310352	3922393	 3bd9d9	vmlinux

size kernel/cpu.o
size: 'kernel/cpu.o': No such file

After:
size vmlinux
   text	   data	    bss	    dec	    hex	filename
3305621	 306420	 310352	3922393	 3bd9d9	vmlinux

size kernel/cpu.o
   text	   data	    bss	    dec	    hex	filename
     96	     24	      0	    120	     78	kernel/cpu.o

Max

  reply	other threads:[~2008-05-30  4:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29 18:17 [PATCH] sched: CPU hotplug events must not destroy scheduler domains created by the cpusets Max Krasnyansky
2008-05-29 18:17 ` [PATCH] sched: Move cpu masks from kernel/sched.c into kernel/cpu.c Max Krasnyansky
2008-05-29 18:17   ` [PATCH] sched: Give cpusets exclusive control over sched domains (ie remove cpu_isolated_map) Max Krasnyansky
2008-05-29 22:37     ` Paul Jackson
2008-05-29 22:59       ` Max Krasnyanskiy
2008-05-30  0:12         ` Paul Jackson
2008-05-30  4:24           ` Max Krasnyansky
2008-05-30  6:52             ` Paul Jackson
2008-05-31 19:12               ` Max Krasnyansky
2008-06-01  9:21                 ` Peter Zijlstra
2008-06-02  2:39                   ` Paul Jackson
2008-06-02  2:35                 ` Paul Jackson
2008-06-04  0:49     ` Paul Jackson
2008-05-29 23:26   ` [PATCH] sched: Move cpu masks from kernel/sched.c into kernel/cpu.c Paul Jackson
2008-05-30  4:08     ` Max Krasnyansky [this message]
2008-05-30  4:10       ` Paul Jackson
2008-06-02 15:19 ` [PATCH] sched: CPU hotplug events must not destroy scheduler domains created by the cpusets Paul Jackson
2008-06-02 17:55   ` Max Krasnyansky
2008-06-02 19:01   ` Max Krasnyansky
  -- strict thread matches above, loose matches on Subject: below --
2008-05-27 22:06 [PATCH] [sched] Move cpu masks from kernel/sched.c into kernel/cpu.c Max Krasnyansky
2008-05-29  4:40 ` Paul Jackson
2008-05-29 16:30   ` Max Krasnyanskiy

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=483F7DC3.9080705@qualcomm.com \
    --to=maxk@qualcomm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    --cc=pj@sgi.com \
    --cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox