Re: [PATCH 01/31] mm: serialize access to min_free_kbytes

From: Neil Brown
Date: Fri Oct 02 2009 - 01:19:29 EST


On Thursday October 1, rientjes@xxxxxxxxxx wrote:
> On Thu, 1 Oct 2009, Suresh Jayaraman wrote:
>
> > From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> >
> > There is a small race between the procfs caller and the memory hotplug caller
> > of setup_per_zone_wmarks(). Not a big deal, but the next patch will add yet
> > another caller. Time to close the gap.
> >
>
> By "next patch," you mean "mm: emegency pool" (patch 08/31)?

:-) It is always safer to say "a subsequent patch", isn't it....

>
> If so, can't you eliminate var_free_mutex entirely from that patch and
> take min_free_lock in adjust_memalloc_reserve() instead?

adjust_memalloc_reserve does a test alloc/free cycle under a lock.
That cannot be done under a spin-lock, it must be a mutex.
So I don't think you can eliminate var_free_mutex.

Thanks,
NeilBrown

>
> [ __adjust_memalloc_reserve() would call __setup_per_zone_wmarks()
> under lock instead, now. ]
--
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/