Files
kernel_xiaomi_sm8250/include/linux
Martin Peschke 7ff6f08295 [PATCH] CPU hotplug compatible alloc_percpu()
This patch splits alloc_percpu() up into two phases.  Likewise for
free_percpu().  This allows clients to limit initial allocations to online
cpu's, and to populate or depopulate per-cpu data at run time as needed:

  struct my_struct *obj;

  /* initial allocation for online cpu's */
  obj = percpu_alloc(sizeof(struct my_struct), GFP_KERNEL);

  ...

  /* populate per-cpu data for cpu coming online */
  ptr = percpu_populate(obj, sizeof(struct my_struct), GFP_KERNEL, cpu);

  ...

  /* access per-cpu object */
  ptr = percpu_ptr(obj, smp_processor_id());

  ...

  /* depopulate per-cpu data for cpu going offline */
  percpu_depopulate(obj, cpu);

  ...

  /* final removal */
  percpu_free(obj);

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-26 08:48:47 -07:00
..
2006-08-03 16:56:02 -04:00
2006-09-07 15:57:12 +01:00
2006-08-31 00:02:15 -04:00
2006-09-11 13:32:30 -04:00
2006-09-23 21:03:52 -05:00
2006-09-22 23:24:30 -04:00
2006-09-22 15:18:47 -07:00
2006-07-28 21:02:00 -07:00
2006-08-21 10:02:50 +02:00
2006-09-22 14:53:32 -07:00
2006-09-22 15:20:25 -07:00
2006-07-31 13:28:39 -07:00
2006-09-26 08:48:47 -07:00
2006-09-22 14:54:20 -07:00
2006-08-27 11:01:32 -07:00
2006-09-23 15:33:43 -05:00
2006-08-19 17:44:31 -04:00
2006-09-26 08:48:44 -07:00
2006-09-22 14:55:02 -07:00
2006-09-01 11:39:08 -07:00
2006-09-22 14:53:36 -07:00
2006-09-26 08:48:45 -07:00
2006-09-26 08:48:47 -07:00
2006-09-22 15:20:25 -07:00
2006-09-26 08:48:45 -07:00
2006-09-26 08:48:44 -07:00