From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it1-f197.google.com (mail-it1-f197.google.com [209.85.166.197]) by kanga.kvack.org (Postfix) with ESMTP id A00DE6B0003 for ; Fri, 19 Oct 2018 00:50:42 -0400 (EDT) Received: by mail-it1-f197.google.com with SMTP id v13-v6so2485491itc.4 for ; Thu, 18 Oct 2018 21:50:42 -0700 (PDT) Received: from userp2120.oracle.com (userp2120.oracle.com. [156.151.31.85]) by mx.google.com with ESMTPS id y6si1765386itk.74.2018.10.18.21.50.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 21:50:41 -0700 (PDT) Subject: Re: [PATCH] hugetlbfs: dirty pages as they are added to pagecache References: <20181018041022.4529-1-mike.kravetz@oracle.com> <20181018160827.0cb656d594ffb2f0f069326c@linux-foundation.org> <6d6e4733-39aa-a958-c0a2-c5a47cdcc7d0@oracle.com> <20181019004621.GA30067@redhat.com> <20181018184726.fb8da5c733da5e0c6a235101@linux-foundation.org> From: Mike Kravetz Message-ID: <9eb7cf71-5bc8-5cd4-9f3e-95375d40060b@oracle.com> Date: Thu, 18 Oct 2018 21:50:32 -0700 MIME-Version: 1.0 In-Reply-To: <20181018184726.fb8da5c733da5e0c6a235101@linux-foundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton , Andrea Arcangeli Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michal Hocko , Hugh Dickins , Naoya Horiguchi , "Aneesh Kumar K . V" , "Kirill A . Shutemov" , Davidlohr Bueso , Alexander Viro , stable@vger.kernel.org On 10/18/18 6:47 PM, Andrew Morton wrote: > On Thu, 18 Oct 2018 20:46:21 -0400 Andrea Arcangeli wrote: > >> On Thu, Oct 18, 2018 at 04:16:40PM -0700, Mike Kravetz wrote: >>> I was not sure about this, and expected someone could come up with >>> something better. It just seems there are filesystems like huegtlbfs, >>> where it makes no sense wasting cycles traversing the filesystem. So, >>> let's not even try. >>> >>> Hoping someone can come up with a better method than hard coding as >>> I have done above. >> >> It's not strictly required after marking the pages dirty though. The >> real fix is the other one? Could we just drop the hardcoding and let >> it run after the real fix is applied? Yeah. The other part of the patch is the real fix. This drop_caches part is not necessary. >> The performance of drop_caches doesn't seem critical, especially with >> gigapages. tmpfs doesn't seem to be optimized away from drop_caches >> and the gain would be bigger for tmpfs if THP is not enabled in the >> mount, so I'm not sure if we should worry about hugetlbfs first. > > I guess so. I can't immediately see a clean way of expressing this so > perhaps it would need a new BDI_CAP_NO_BACKING_STORE. Such a > thing hardly seems worthwhile for drop_caches. > > And drop_caches really shouldn't be there anyway. It's a standing > workaround for ongoing suckage in pagecache and metadata reclaim > behaviour :( I'm OK with dropping the other part. It just seemed like there was no real reason to try and drop_caches for hugetlbfs (and perhaps others). Andrew, would you like another version? Or can you just drop the fs/drop_caches.c part? -- Mike Kravetz