Re: [PATCH] mm/nommu.c:Dynamic alloc/free percpu area for nommu

From: Tejun Heo
Date: Wed Apr 07 2010 - 22:43:46 EST


Hello, Sonic.

> I tested your patch on NOMMU bf561 with SMP enabled. It is compiled
> and boots without problem. Because there are few percpu data defined
> in bf561 SMP kernel, the functions in mm/percpu-km.c may not be
> executed with a simple test. But, since these functions are simple
> malloc/free, I don't see any problem.

Great, thanks for testing. Just in case, can you please test with the
attached module? In test-pcpu.c, the cmds table directs the module
what to allocate and free. { size > 0, tag } entry makes it allocate
an area with the specified size and tag and { 0, tag } entry makes it
free all areas with the matching tag. The existing table makes pretty
large amount of allocations and might not work very well on nommu
configuration. There are also several DEFINE_PER_CPU() instances to
test module static percpu area alloc/free. Please insmod/rmmod in
loop and make sure it doesn't leak any memory or crashes the machine.

Thanks.

--
tejun

Attachment: test-pcpu.tar.gz
Description: GNU Zip compressed data