<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/cpu.c, branch v2.6.12.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.12.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.12.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2005-01-11T09:40:38Z</updated>
<entry>
<title>[PATCH] cputime: introduce cputime</title>
<updated>2005-01-11T09:40:38Z</updated>
<author>
<name>Martin Schwidefsky</name>
<email>schwidefsky@de.ibm.com</email>
</author>
<published>2005-01-11T09:40:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0a71336b6a8858a525007c5b4e0d14ba57f9f315'/>
<id>urn:sha1:0a71336b6a8858a525007c5b4e0d14ba57f9f315</id>
<content type='text'>
This patch introduces the concept of (virtual) cputime.  Each architecture
can define its method to measure cputime.  The main idea is to define a
cputime_t type and a set of operations on it (see asm-generic/cputime.h).
Then use the type for utime, stime, cutime, cstime, it_virt_value,
it_virt_incr, it_prof_value and it_prof_incr and use the cputime operations
for each access to these variables.  The default implementation is jiffies
based and the effect of this patch for architectures which use the default
implementation should be neglectible.

There is a second type cputime64_t which is necessary for the kernel_stat
cpu statistics.  The default cputime_t is 32 bit and based on HZ, this will
overflow after 49.7 days.  This is not enough for kernel_stat (ihmo not
enough for a processes too), so it is necessary to have a 64 bit type.

The third thing that gets introduced by this patch is an additional field
for the /proc/stat interface: cpu steal time.  An architecture can account
cpu steal time by calls to the account_stealtime function.  The cpu which
backs a virtual processor doesn't spent all of its time for the virtual
cpu.  To get meaningful cpu usage numbers this involuntary wait time needs
to be accounted and exported to user space.

From: Hugh Dickins &lt;hugh@veritas.com&gt;

The p-&gt;signal check in account_system_time is insufficient.  If the timer
interrupt hits near the end of exit_notify, after EXIT_ZOMBIE has been set,
another cpu may release_task (NULLifying p-&gt;signal) in between
account_system_time's check and check_rlimit's dereference.  Nor should
account_it_prof risk send_sig.  But surely account_user_time is safe?

Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] cpu_down() warning fix</title>
<updated>2005-01-08T06:00:31Z</updated>
<author>
<name>Nathan Lynch</name>
<email>nathanl@austin.ibm.com</email>
</author>
<published>2005-01-08T06:00:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e975169bcfca519ad2b280fbfdd12bbef11ee6b7'/>
<id>urn:sha1:e975169bcfca519ad2b280fbfdd12bbef11ee6b7</id>
<content type='text'>
Fix (harmless?) smp_processor_id() usage in preemptible section of
cpu_down.

Signed-off-by: Nathan Lynch &lt;nathanl@austin.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] take me home, hotplug_path[]</title>
<updated>2004-11-01T05:06:49Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2004-11-01T05:06:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6f1780569c67765e1fef8754fc1812714b85e4d0'/>
<id>urn:sha1:6f1780569c67765e1fef8754fc1812714b85e4d0</id>
<content type='text'>
Move hotplug_path[] out of kmod.[ch] to kobject_uevent.[ch] where
it belongs now. At some time in the future we should fix the remaining bad
hotplug calls (no SEQNUM, no netlink uevent):

  ./drivers/input/input.c (no DEVPATH on some hotplug events!)
  ./drivers/pnp/pnpbios/core.c
  ./drivers/s390/crypto/z90main.c

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;greg@kroah.com&gt;
</content>
</entry>
<entry>
<title>[PATCH] remove cpu_run_sbin_hotplug()</title>
<updated>2004-10-22T07:29:57Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-10-22T07:29:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=28b5fd2263de53d325c84b6b3c3a5ef55263c5aa'/>
<id>urn:sha1:28b5fd2263de53d325c84b6b3c3a5ef55263c5aa</id>
<content type='text'>
From: Keshavamurthy Anil S &lt;anil.s.keshavamurthy@intel.com&gt;

Remove cpu_run_sbin_hotplug() - use kobject_hotplug() instead.

Signed-off-by: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;greg@kroah.com&gt;
</content>
</entry>
<entry>
<title>[PATCH] sched: hotplug add a CPU_DOWN_FAILED notifier</title>
<updated>2004-10-18T16:10:25Z</updated>
<author>
<name>Nick Piggin</name>
<email>nickpiggin@yahoo.com.au</email>
</author>
<published>2004-10-18T16:10:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=71da3667be80d30121df3972caa0bf5684228379'/>
<id>urn:sha1:71da3667be80d30121df3972caa0bf5684228379</id>
<content type='text'>
Introduce CPU_DOWN_FAILED notifier, so we can cope with a failure after a
CPU_DOWN_PREPARE notice.

This fixes 3/8 "add CPU_DOWN_PREPARE notifier" to be useful

Signed-off-by: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] sched: add CPU_DOWN_PREPARE notifier</title>
<updated>2004-10-18T16:08:34Z</updated>
<author>
<name>Nick Piggin</name>
<email>nickpiggin@yahoo.com.au</email>
</author>
<published>2004-10-18T16:08:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d13d28de21d913aacd3c91e76e307fa2eb7835d8'/>
<id>urn:sha1:d13d28de21d913aacd3c91e76e307fa2eb7835d8</id>
<content type='text'>
Add a CPU_DOWN_PREPARE hotplug CPU notifier.  This is needed so we can dettach
all sched-domains before a CPU goes down, thus we can build domains from
online cpumasks, and not have to check for the possibility of a CPU coming up
or going down.

Signed-off-by: Nick Piggin &lt;nickpiggin@yahoo.com.au&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Add DEVPATH env variable to hotplug helper call</title>
<updated>2004-10-03T02:51:31Z</updated>
<author>
<name>Josef \'Jeff\' Sipek</name>
<email>jeffpc@optonline.net</email>
</author>
<published>2004-10-03T02:51:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2866792071f8c7a8ab5cf6818835ed7243dafeae'/>
<id>urn:sha1:2866792071f8c7a8ab5cf6818835ed7243dafeae</id>
<content type='text'>
Add $DEVPATH to the environmental variables during /sbin/hotplug call.

Signed-off-by: Josef 'Jeff' Sipek &lt;jeffpc@optonline.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] cpumask: make cpu_present_map real even on non-smp</title>
<updated>2004-06-24T01:50:29Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-06-24T01:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d2cec97bc421d6f9c2ee0d9bd8e0ce47d0022cac'/>
<id>urn:sha1:d2cec97bc421d6f9c2ee0d9bd8e0ce47d0022cac</id>
<content type='text'>
From: Paul Jackson &lt;pj@sgi.com&gt;

This patch makes cpu_present_map a real map for all configurations, instead of
a constant for non-SMP.  It also moves the definition of cpu_present_map out
of kernel/cpu.c into kernel/sched.c, because cpu.c isn't compiled into non-SMP
kernels.

The pattern is that each of the possible, present and online cpu maps are
actual kernel global cpumask_t variables, for all configurations.  They are
documented in include/linux/cpumask.h.  Some of the UP (NR_CPUS=1) code
cheats, and hardcodes the assumption that the single bit position of these
maps is always set, as an optimization.

Signed-off-by: Paul Jackson &lt;pj@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Revisited: ia64-cpu-hotplug-cpu_present.patch</title>
<updated>2004-05-14T12:44:45Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-05-14T12:44:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fda94eff9b081a5e498d7d9aabf7d418f5249b0d'/>
<id>urn:sha1:fda94eff9b081a5e498d7d9aabf7d418f5249b0d</id>
<content type='text'>
From: Paul Jackson &lt;pj@sgi.com&gt;

With a hotplug capable kernel, there is a requirement to distinguish a
possible CPU from one actually present.  The set of possible CPU numbers
doesn't change during a single system boot, but the set of present CPUs
changes as CPUs are physically inserted into or removed from a system.  The
cpu_possible_map does not change once initialized at boot, but the
cpu_present_map changes dynamically as CPUs are inserted or removed.


Paul Jackson &lt;pj@sgi.com&gt; provided an expanded explanation:


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.
</content>
</entry>
<entry>
<title>[PATCH] Move migrate_all_tasks to CPU_DEAD handling</title>
<updated>2004-05-10T06:30:01Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-05-10T06:30:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ddea677b6730f9f72d94f87885e38cff6d329fab'/>
<id>urn:sha1:ddea677b6730f9f72d94f87885e38cff6d329fab</id>
<content type='text'>
From: Srivatsa Vaddagiri &lt;vatsa@in.ibm.com&gt;

migrate_all_tasks is currently run with rest of the machine stopped.
It iterates thr' the complete task table, turning off cpu affinity of any task
that it finds affine to the dying cpu. Depending on the task table
size this can take considerable time. All this time machine is stopped, doing
nothing.

Stopping the machine for such extended periods can be avoided if we do
task migration in CPU_DEAD notification and that's precisely what this patch
does.

The patch puts idle task to the _front_ of the dying CPU's runqueue at the 
highest priority possible. This cause idle thread to run _immediately_ after
kstopmachine thread yields. Idle thread notices that its cpu is offline and
dies quickly. Task migration can then be done at leisure in CPU_DEAD
notification, when rest of the CPUs are running.

Some advantages with this approach are:

	- More scalable. Predicatable amout of time that machine is stopped.
	- No changes to hot path/core code. We are just exploiting scheduler
	  rules which runs the next high-priority task on the runqueue. Also
	  since I put idle task to the _front_ of the runqueue, there
	  are no races when a equally high priority task is woken up
	  and added to the runqueue. It gets in at the back of the runqueue,
	  _after_ idle task!
	- cpu_is_offline check that is presenty required in try_to_wake_up,
	  idle_balance and rebalance_tick can be removed, thus speeding them
	  up a bit

From: Srivatsa Vaddagiri &lt;vatsa@in.ibm.com&gt;

  Rusty mentioned that the unlikely hints against cpu_is_offline is
  redundant since the macro already has that hint.  Patch below removes those
  redundant hints I added.
</content>
</entry>
</feed>
