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

From: Linus Torvalds
Date: Fri Dec 21 2012 - 16:51:56 EST


On Fri, Dec 21, 2012 at 10:21 AM, Hugh Dickins <hughd@xxxxxxxxxx> wrote:
> On Fri, 21 Dec 2012, Linus Torvalds wrote:
>>
>> compared to the diseased abortion you just posted.
>
> I'm picking up a vibe that you don't entirely like Mel's approach.

Good job. I was a bit nervous that I was being too subtle.

> I don't understand David's and Mel's remarks about the "shared pages"
> check making Sasha's warning unlikely: page_mapcount has nothing to do
> with whether a page belongs to shm/shmem/tmpfs, and it's easy enough
> to reproduce Sasha's warning on the current git tree. "mount -o
> remount,mpol=local /tmp" or something like that is useful in testing.

I think that Mel and David may talk about the mutex actually blocking
(not just the debug message possibly triggering).

> I wish wish wish I had time to spend on this today, but I don't.
> And I've not looked to see (let alone tested) whether it's easy
> to revert Mel's mutex then add in Kosaki's patch (which I didn't
> look at so have no opinion on).

I don't actually have Kosaki's patch either, just the description of
it. We've done that kind of "preallocate before taking the lock"
before, though.

> Shall we go for Peter/David's mutex+spinlock for rc1 - I assume
> they both tested that - with a promise to do better in rc2?

Well, if the plan is to fix it for rc2, then there is no point in
putting a workaround in now, since actually hitting the problem (as
opposed to seeing the warning) is presumably much harder.

Linus
--
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/