[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160523190154.GA79357@black.fi.intel.com>
Date: Mon, 23 May 2016 22:01:54 +0300
From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To: Rik van Riel <riel@...hat.com>
Cc: Michal Hocko <mhocko@...nel.org>,
Ebru Akagunduz <ebru.akagunduz@...il.com>, linux-mm@...ck.org,
hughd@...gle.com, akpm@...ux-foundation.org,
n-horiguchi@...jp.nec.com, aarcange@...hat.com,
iamjoonsoo.kim@....com, gorcunov@...nvz.org,
linux-kernel@...r.kernel.org, mgorman@...e.de, rientjes@...gle.com,
vbabka@...e.cz, aneesh.kumar@...ux.vnet.ibm.com,
hannes@...xchg.org, boaz@...xistor.com
Subject: Re: [PATCH 3/3] mm, thp: make swapin readahead under down_read of
mmap_sem
On Mon, May 23, 2016 at 02:49:09PM -0400, Rik van Riel wrote:
> On Mon, 2016-05-23 at 20:42 +0200, Michal Hocko wrote:
> > On Mon 23-05-16 20:14:11, Ebru Akagunduz wrote:
> > >
> > > Currently khugepaged makes swapin readahead under
> > > down_write. This patch supplies to make swapin
> > > readahead under down_read instead of down_write.
> > You are still keeping down_write. Can we do without it altogether?
> > Blocking mmap_sem of a remote proces for write is certainly not nice.
>
> Maybe Andrea can explain why khugepaged requires
> a down_write of mmap_sem?
>
> If it were possible to have just down_read that
> would make the code a lot simpler.
You need a down_write() to retract page table. We need to make sure that
nobody sees the page table before we can replace it with huge pmd.
--
Kirill A. Shutemov
Powered by blists - more mailing lists