Re: [PATCH 00/14] Small step toward KSM for file back page.

2020-10-08 Thread Jerome Glisse
On Thu, Oct 08, 2020 at 04:43:41PM +0100, Matthew Wilcox wrote: > On Thu, Oct 08, 2020 at 11:30:28AM -0400, Jerome Glisse wrote: > > On Wed, Oct 07, 2020 at 11:09:16PM +0100, Matthew Wilcox wrote: > > > So ... why don't you put a PageKsm page in the page cache? That way you > > > can share code

Re: [PATCH 00/14] Small step toward KSM for file back page.

2020-10-08 Thread Matthew Wilcox
On Thu, Oct 08, 2020 at 11:30:28AM -0400, Jerome Glisse wrote: > On Wed, Oct 07, 2020 at 11:09:16PM +0100, Matthew Wilcox wrote: > > So ... why don't you put a PageKsm page in the page cache? That way you > > can share code with the current KSM implementation. You'd need > > something like this:

Re: [PATCH 00/14] Small step toward KSM for file back page.

2020-10-08 Thread Jerome Glisse
On Wed, Oct 07, 2020 at 11:09:16PM +0100, Matthew Wilcox wrote: > On Wed, Oct 07, 2020 at 01:54:19PM -0400, Jerome Glisse wrote: > > > For other things (NUMA distribution), we can point to something which > > > isn't a struct page and can be distiguished from a real struct page by a > > > bit

Re: [PATCH 00/14] Small step toward KSM for file back page.

2020-10-07 Thread Matthew Wilcox
On Wed, Oct 07, 2020 at 01:54:19PM -0400, Jerome Glisse wrote: > > For other things (NUMA distribution), we can point to something which > > isn't a struct page and can be distiguished from a real struct page by a > > bit somewhere (I have ideas for at least three bits in struct page that > >

Re: [PATCH 00/14] Small step toward KSM for file back page.

2020-10-07 Thread Jerome Glisse
On Wed, Oct 07, 2020 at 07:33:16PM +0100, Matthew Wilcox wrote: > On Wed, Oct 07, 2020 at 01:54:19PM -0400, Jerome Glisse wrote: > > On Wed, Oct 07, 2020 at 06:05:58PM +0100, Matthew Wilcox wrote: > > > On Wed, Oct 07, 2020 at 10:48:35AM -0400, Jerome Glisse wrote: > > > > On Wed, Oct 07, 2020 at

Re: [PATCH 00/14] Small step toward KSM for file back page.

2020-10-07 Thread Matthew Wilcox
On Wed, Oct 07, 2020 at 01:54:19PM -0400, Jerome Glisse wrote: > On Wed, Oct 07, 2020 at 06:05:58PM +0100, Matthew Wilcox wrote: > > On Wed, Oct 07, 2020 at 10:48:35AM -0400, Jerome Glisse wrote: > > > On Wed, Oct 07, 2020 at 04:20:13AM +0100, Matthew Wilcox wrote: > > > > On Tue, Oct 06, 2020 at

Re: [PATCH 00/14] Small step toward KSM for file back page.

2020-10-07 Thread Jerome Glisse
On Wed, Oct 07, 2020 at 06:05:58PM +0100, Matthew Wilcox wrote: > On Wed, Oct 07, 2020 at 10:48:35AM -0400, Jerome Glisse wrote: > > On Wed, Oct 07, 2020 at 04:20:13AM +0100, Matthew Wilcox wrote: > > > On Tue, Oct 06, 2020 at 09:05:49PM -0400, jgli...@redhat.com wrote: > > > > The present

Re: [PATCH 00/14] Small step toward KSM for file back page.

2020-10-07 Thread Matthew Wilcox
On Wed, Oct 07, 2020 at 10:48:35AM -0400, Jerome Glisse wrote: > On Wed, Oct 07, 2020 at 04:20:13AM +0100, Matthew Wilcox wrote: > > On Tue, Oct 06, 2020 at 09:05:49PM -0400, jgli...@redhat.com wrote: > > > The present patchset just add mapping argument to the various vfs call- > > > backs. It

Re: [PATCH 00/14] Small step toward KSM for file back page.

2020-10-07 Thread Jerome Glisse
On Wed, Oct 07, 2020 at 04:20:13AM +0100, Matthew Wilcox wrote: > On Tue, Oct 06, 2020 at 09:05:49PM -0400, jgli...@redhat.com wrote: > > The present patchset just add mapping argument to the various vfs call- > > backs. It does not make use of that new parameter to avoid regression. > > I am

Re: [PATCH 00/14] Small step toward KSM for file back page.

2020-10-06 Thread Matthew Wilcox
On Tue, Oct 06, 2020 at 09:05:49PM -0400, jgli...@redhat.com wrote: > The present patchset just add mapping argument to the various vfs call- > backs. It does not make use of that new parameter to avoid regression. > I am posting this whole things as small contain patchset as it is rather > big

[PATCH 00/14] Small step toward KSM for file back page.

2020-10-06 Thread jglisse
From: Jérôme Glisse This patchset is a step toward a larger objective: generalize existing KSM into a mechanism allowing exclusive write control for a page; either anonymous memory (like KSM today) or file back page (modulo GUP which would block that like it does today for KSM). Exclusive write