Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756380AbcDDVWg (ORCPT ); Mon, 4 Apr 2016 17:22:36 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34597 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756276AbcDDVWf (ORCPT ); Mon, 4 Apr 2016 17:22:35 -0400 Date: Mon, 4 Apr 2016 14:22:33 -0700 From: Andrew Morton To: Johannes Weiner Cc: Andres Freund , Rik van Riel , 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: <20160404142233.cfdea284b8107768fb359efd@linux-foundation.org> In-Reply-To: <1459790018-6630-3-git-send-email-hannes@cmpxchg.org> References: <1459790018-6630-1-git-send-email-hannes@cmpxchg.org> <1459790018-6630-3-git-send-email-hannes@cmpxchg.org> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 772 Lines: 16 On Mon, 4 Apr 2016 13:13:37 -0400 Johannes Weiner wrote: > Andres Freund observed that his database workload is struggling with > the transaction journal creating pressure on frequently read pages. > > Access patterns like transaction journals frequently write the same > pages over and over, but in the majority of cases those pages are > never read back. There are no caching benefits to be had for those > pages, so activating them and having them put pressure on pages that > do benefit from caching is a bad choice. Read-after-write is a pretty common pattern: temporary files for example. What are the opportunities for regressions here? Did you consider providing userspace with a way to hint "this file is probably write-then-not-read"?