[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Patch] linux: avoid kmalloc while disabling interrupts



>>> Akio Takebe <takebe_akio@xxxxxxxxxxxxxx> 09.09.08 09:41 >>>
>We should avoid using kmalloc while interrupts is disabled.
>kmalloc may sleep.
>
>Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>

I was under the impression that this is why the code uses GFP_ATOMIC.

Also, doesn't that patch introduce new problems, in dropping the lock
intermediately and then adding entries to lists without checking for
already existing entries again? I'd suppose if you want the allocations
to be done outside of the lock, you should do them in advance
(regardless of whether you'll actually need them) and free the memory
after dropping the lock if the entries weren't really inserted anywhere.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.