public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Ashok Raj <ashok.raj@intel.com>
Cc: akpm@osdl.org, davidm@hpl.hp.com, linux-kernel@vger.kernel.org,
	anil.s.keshavamurthy@intel.com
Subject: Re: (resend) take3: Updated CPU Hotplug patches for IA64 (pj blessed) Patch [6/7]
Date: Tue, 11 May 2004 16:16:53 -0700	[thread overview]
Message-ID: <20040511161653.49e836e5.pj@sgi.com> (raw)
In-Reply-To: <20040504211755.A13286@unix-os.sc.intel.com>

Being somewhat thick in the head at times, it took me a lengthy private
email thread with Ashok to understand why he needed to add a
cpu_present_map for his cpu hotplug work, and just how that new map
related to the existing ones.

After patient and repeated explanations from Ashok, I worked out the
following explanation that he found accurate.  On the off chance that
others find this way of phrasing it helpful, I post it here for the
record.

===

Ashok's cpu hot plug patch adds a cpu_present_map, resulting in the
following cpu maps being available.  All the following maps are fixed
size bitmaps of size NR_CPUS.

#ifdef CONFIG_HOTPLUG_CPU
	cpu_possible_map - map with all NR_CPUS bits set
	cpu_present_map - map with bit 'cpu' set iff cpu is populated
	cpu_online_map - map with bit 'cpu' set iff cpu available to scheduler
#else
	cpu_possible_map - map with bit 'cpu' set iff cpu is populated
	cpu_present_map - copy of cpu_possible_map
	cpu_online_map - map with bit 'cpu' set iff cpu available to scheduler
#endif

In either case, NR_CPUS is fixed at compile time, as the static size of
these bitmaps.  The cpu_possible_map is fixed at boot time, as the set
of CPU id's that it is possible might ever be plugged in at anytime
during the life of that system boot.  The cpu_present_map is dynamic(*),
representing which CPUs are currently plugged in.  And cpu_online_map is
the dynamic subset of cpu_present_map, indicating those CPUs available
for scheduling.

If HOTPLUG is enabled, then cpu_possible_map is forced to have all
NR_CPUS bits set, otherwise it is just the set of CPUs that ACPI reports
present at boot.

If HOTPLUG is enabled, then cpu_present_map varies dynamically,
depending on what ACPI reports as currently plugged in, otherwise
cpu_present_map is just a copy of cpu_possible_map.

(*) Well, cpu_present_map is dynamic in the hotplug case.
    If not hotplug, it's the same as cpu_possible_map, hence
    fixed at boot.

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

  parent reply	other threads:[~2004-05-11 23:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-05  4:17 (resend) take3: Updated CPU Hotplug patches for IA64 (pj blessed) Patch [6/7] Ashok Raj
2004-05-05  5:59 ` Andrew Morton
2004-05-05  7:03   ` various cpu patches [was: (resend) take3: Updated CPU Hotplug patches] Paul Jackson
2004-05-05  7:14     ` Andrew Morton
2004-05-05  7:28       ` Paul Jackson
2004-05-05  7:24     ` William Lee Irwin III
2004-05-05  7:44       ` Paul Jackson
2004-05-05  7:52         ` William Lee Irwin III
2004-05-05  7:44   ` (resend) take3: Updated CPU Hotplug patches for IA64 (pj blessed) Patch [6/7] Nick Piggin
2004-05-05 14:07   ` Ashok Raj
2004-05-05 17:47   ` (resend-2) " Ashok Raj
2004-05-06  6:13     ` Andrew Morton
2004-05-06  9:32       ` (resend-3) " Ashok Raj
2004-05-06  9:45         ` Andrew Morton
2004-05-06  9:54           ` Ashok Raj
2004-05-05 17:50   ` (resend-2) take3: Updated CPU Hotplug patches for IA64 (pj blessed) Patch [7/7] Ashok Raj
2004-05-11 23:16 ` Paul Jackson [this message]
2004-05-11 23:38   ` (resend) take3: Updated CPU Hotplug patches for IA64 (pj blessed) Patch [6/7] Andrew Morton
2004-05-11 23:55     ` Paul Jackson
2004-05-11 23:58     ` Ashok Raj
2004-05-12  0:37       ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2004-05-12  0:00 Keshavamurthy, Anil S

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=20040511161653.49e836e5.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@osdl.org \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=ashok.raj@intel.com \
    --cc=davidm@hpl.hp.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