[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55532CB0.6070400@yandex-team.ru>
Date: Wed, 13 May 2015 13:51:28 +0300
From: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
To: Mark Williamson <mwilliamson@...o-software.com>
CC: linux-mm@...ck.org, Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
kernel list <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Pavel Emelyanov <xemul@...allels.com>,
Linux API <linux-api@...r.kernel.org>,
Andy Lutomirski <luto@...capital.net>,
Vlastimil Babka <vbabka@...e.cz>, Pavel Machek <pavel@....cz>,
Mark Seaborn <mseaborn@...omium.org>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Daniel James <djames@...o-software.com>,
Finn Grimwood <fgrimwood@...o-software.com>
Subject: Re: [PATCH v2 1/3] pagemap: add mmap-exclusive bit for marking pages
mapped only here
On 12.05.2015 15:05, Mark Williamson wrote:
> Hi Konstantin,
>
> I hope you won't mind me thinking out loud here on the idea of adding
> a flag to the v2 pagemap fields... From a kernel PoV, I agree that
> this seems like the cleanest approach. However, with my application
> developer hat on:
>
> 1. I was hoping we'd be able to backport a compatible fix to older
> kernels that might adopt the pagemap permissions change. Using the V2
> format flags rules out doing this for kernels that are too old to have
> soft-dirty, I think.
>
> 2. From our software's PoV, I feel it's worth noting that it doesn't
> strictly fix ABI compatibility, though I realise that's probably not
> your primary concern here. We'll need to modify our code to write the
> clear_refs file but that change is OK for us if it's the preferred
> solution.
>
> In the patches I've been playing with, I was considering putting the
> Exclusive flag in the now-unused PFN field of the pagemap entries.
> Since we're specifically trying to work around for the lack of PFN
> information, would there be any appetite for mirroring this flag
> unconditionally into the now-empty PFN field (i.e. whether using v1 or
> v2 flags) when accessed by an unprivileged process?
>
> I realise it's ugly from a kernel PoV and I feel a little bad for
> suggesting it - but it would address points 1 and 2 for us (our
> existing code just looks for changes in the pagemap entry, so sticking
> the flag in there would cause it to do the right thing).
>
> I'm sorry to raise application-specific issues at this point; I
> appreciate that your primary concern is to improve the kernel and
> technically I like the approach that you've taken! I'll try and
> provide more code-oriented feedback once I've tried out the changes.
I prefer to backport v2 format (except soft-dirty bit and clear_refs)
into older kernels. Page-shift bits are barely used so nobody will see
the difference.
--
Konstantin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists