From: David Miller <davem@davemloft.net>
To: iconoclasmandheresy@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: Off-by-one bug on sun4u SMP
Date: Thu, 10 Jun 2010 22:26:29 -0700 (PDT) [thread overview]
Message-ID: <20100610.222629.116376474.davem@davemloft.net> (raw)
In-Reply-To: <AANLkTimrIOLiX3m3rFsdakHn8PRhkfSHCCmYUlw6rkFz@mail.gmail.com>
From: Ryan Davis <iconoclasmandheresy@gmail.com>
Date: Thu, 10 Jun 2010 21:01:28 -0700
> OK... so there are no kernel data structures allocated for CPU #0
> which is not present? It is my understanding that this is not the case
> but I could be wrong. If this is true, then a chunk of kernel memory
> is wasted tor the phantom CPU #0.
There are two cases.
1) There are certain arrays which we have to allocate before we know
how many physical cpus will be present. There are therefore
CONFIG_NR_CPUS of these elements allocated statically in the
kernel image.
These cases are extremely few and constantly decreasing over time
as we find ways to remove these cases.
2) Everything else is only allocated for cpus actually present.
Frankly, I often run with CONFIG_NR_CPUS=2048 or some crazy value like
that and the memory wasted by static data structures is very small.
> A quick search was unable to find documentation on this quirk. Perhaps
> you could point me at some?
Feel free to write a patch which adds that documentation.
prev parent reply other threads:[~2010-06-11 5:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-10 18:05 Ryan Davis
2010-06-11 0:37 ` David Miller
2010-06-11 4:01 ` Ryan Davis
2010-06-11 5:26 ` David Miller [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=20100610.222629.116376474.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=iconoclasmandheresy@gmail.com \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®