From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758208AbcDERvM (ORCPT ); Tue, 5 Apr 2016 13:51:12 -0400 Received: from gum.cmpxchg.org ([85.214.110.215]:49236 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755672AbcDERvL (ORCPT ); Tue, 5 Apr 2016 13:51:11 -0400 Date: Tue, 5 Apr 2016 13:50:59 -0400 From: Johannes Weiner To: Rik van Riel Cc: Andrew Morton , Andres Freund , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 2/3] mm: filemap: only do access activations on reads Message-ID: <20160405175059.GA16935@cmpxchg.org> References: <1459790018-6630-1-git-send-email-hannes@cmpxchg.org> <1459790018-6630-3-git-send-email-hannes@cmpxchg.org> <20160404142233.cfdea284b8107768fb359efd@linux-foundation.org> <1459805987.6219.32.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1459805987.6219.32.camel@redhat.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 04, 2016 at 05:39:47PM -0400, Rik van Riel wrote: > As for hinting, I suspect it may make sense to differentiate > between whole page and partial page writes, where partial > page writes use FGP_ACCESSED, and whole page writes do not, > under the assumption that if we write a partial page, there > may be a higher chance that other parts of the page get > accessed again for other writes (or reads). The writeback cache should handle at least the multiple subpage writes case. What I find a little weird about counting accesses from partial writes only is when a write covers a full page and then parts of the next. We would cache only a small piece of what's likely one coherent chunk. Or when a user writes out several pages in a loop of subpage chunks. This will get even worse to program against when we start having page cache transparently backed by pages of different sizes. Because of that I think it'd be better to apply LRU aging decisions based on type of access rather based on specific request sizes.