Re: cpu_init is called during resume



Pavel Machek wrote:
cpu_init() is called during resume, at time when GFP_KERNEL is not
available. This silences warning, and adds few small cleanups.

I presume this is resume from disk. If you're doing resume from RAM, all the CPU-related stuff should already be allocated, unless you're bringing up a new CPU which wasn't previously there, right?

What's the call path for this on resume? In my i386-pda patches, I've rearranged this so that the secondary CPU's GDT (and PDA) are pre-allocated on the boot CPU. Does this help this case, or would they still need to be atomic allocations?

And wouldn't making these allocations atomic make real CPU hotplug (ie, on an active, running system) more likely to fail? This code doesn't deal with allocation failure very elegantly.

J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: how do you start learning assembly language
    ... So then it must be the CPU ... > allocations. ... I allways thought that RosAsm "dynamic" memory, ... It is zummed and then it is allocated by a dynamic memory call. ...
    (alt.lang.asm)
  • Re: Linux 2.6.25-rc2
    ... Mathieu Desnoyers wrote: ... hack below switches the SLUB optimization off by disabling the CPU ... An interrupt handler taking that much time would lead to other ... available allocations before a wrap-around looks safe. ...
    (Linux-Kernel)
  • Re: CPUs, thread pools, and wasted time.
    ... A single CPU ... While your wasteTime() method is just spinning through some mundane cosines ... It's entirely possible that thread spinning mainis pegging your CPU with memory allocations, and spending a full order of magnitude more time than both threads running the wasteTime. ...
    (comp.lang.java.programmer)
  • Re: [PATCH 0/5] make slab gfp fair
    ... All cpus are redirected to ->reserve_slab when the regular allocations ... And the reserve slab is refilled from page allocator reserves if needed? ... this the cpu slab. ...
    (Linux-Kernel)
  • Re: [RFC] non-refcounted pages, application to slab?
    ... >>This is probably not worthwhile for most cases, but slab did strike me ... >>code I think uses the refcount of underlying pages of slab allocations ... So it is not a complete patch, ... > set the value to 0 because no other CPU can be touching the value (or else ...
    (Linux-Kernel)