Re: [patch] mm, mempolicy: Introduce spinlock to read shared policy tree

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

 



On Fri, Dec 21, 2012 at 11:58 AM, Mel Gorman <mgorman@xxxxxxx> wrote:
>
> Kosaki's patch does not fix the actual problem with NUMA hinting
> faults. Converting to a spinlock is nice but we'd still hold the PTL at
> the time sp_alloc is called and potentially allocating GFP_KERNEL with a
> spinlock held.

The problem I saw reported - and the problem that the "mutex+spinlock"
patch was fixing - wasn't actually sp_alloc(), but just sp_lookup()
through mpol_shared_policy_lookup().

And converting that to a spinlock would definitely fix it - taking
that spinlock quickly for the lookup while holding the pt lock is
fine.

Now, if we have to call sp_alloc() too at some point, that's
different, but that wouldn't be helped by the "mutex+spinlock" patch
(that started this thread) anyway.

> At the risk of making your head explode, here is another patch.

So I don't hate this patch, but I don't see the point of your games in
do_pmd_numa_page(). I'm not seeing the allocation in mpol_misplaced(),
and that wasn't what the original report was.

The backtrace you quote is literally *only* about the fact that you
cannot take a mutex inside a spinlock. No allocation, just a lookup.

So where's the sp_alloc()?

                 Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]