Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2032745ybi; Thu, 4 Jul 2019 04:05:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvniRMleh8Cl4ciyyIhiYCPnVyvHyUEjonAGjHIJIY8kgJt2l6OobPPmX7iOsTEAjOxwQM X-Received: by 2002:a17:902:a9ca:: with SMTP id b10mr43448287plr.69.1562238331586; Thu, 04 Jul 2019 04:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562238331; cv=none; d=google.com; s=arc-20160816; b=tzlDJWXG+kPLvELpI6/sY1pUTxOkrxq32HA0DNLlmMbba3jG6WTQNMDcyKcqAsvv3e ddMbbg9OcV5sUFlnIRhPXQbtk25uYz1Ep9TJ26VQgCKrpm6FT/5Xv/QiKWKLCAMd6aXt sWPRsQG/JckS36BIpwWSGgoVqutJmHkOHHTqPuEPNV1/xw2irKr66gT3v6TCrZGgXMQM uatgJO/ghGdzMfJljvVdsRVzsqCmhFpqOSfUOPlxjZ5l+NBZiVz9jaVW9DMqYiYL+mrz 5dLPRdL1HPj3vNxuHxaTCPIp3qre+0fcl65Q3Uf4vBqAdlsJcbnGYELoTAuTLBZImxzs 5JZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=F/9BY1Ps5YjmtLN6X76yUk67wuG4Kc2bLYgzjgFPRYI=; b=S2xaHHz3PXnRNGFIWZJOY3V1mc6iiZNDD4rt6qhSb4nD3RV1ugchznKWUBaizeENZk Id6Xi9klhvNeWImRNngoZC25dukYKWJGQl0uO0XvlRq6JMQRQt7PUyejvtzzGM062jh5 bqOhPt/7QBeDknJgtbh3jwBn9rd0MK8UV7092Mtvv6J09bqHDq98s3ekLQj6IzMqd5Bw blcuKyncFYgX8my1TiiVR9exqqpj/I2DIwNV6GpxL0XAMyiFXifDHalw9dYiSzhWhlyN 4uXWJosodopXeIdfwz0f1Z6nCsZvXUxICuwDr1palPJKOGavw+EOcnMhiOi/egrTLvUo LaFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x8si5225860pgi.136.2019.07.04.04.05.14; Thu, 04 Jul 2019 04:05:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727609AbfGDLE2 (ORCPT + 99 others); Thu, 4 Jul 2019 07:04:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:35270 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727499AbfGDLE1 (ORCPT ); Thu, 4 Jul 2019 07:04:27 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7483FAEAF; Thu, 4 Jul 2019 11:04:26 +0000 (UTC) Date: Thu, 4 Jul 2019 13:04:25 +0200 From: Michal Hocko To: Kuo-Hsin Yang Cc: Andrew Morton , Johannes Weiner , Minchan Kim , Sonny Rao , linux-kernel@vger.kernel.org, linux-mm@kvack.org, stable@vger.kernel.org Subject: Re: [PATCH] mm: vmscan: scan anonymous pages on file refaults Message-ID: <20190704110425.GD5620@dhcp22.suse.cz> References: <20190628111627.GA107040@google.com> <20190701081038.GA83398@google.com> <20190703143057.GQ978@dhcp22.suse.cz> <20190704094716.GA245276@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190704094716.GA245276@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 04-07-19 17:47:16, Kuo-Hsin Yang wrote: > On Wed, Jul 03, 2019 at 04:30:57PM +0200, Michal Hocko wrote: > > > > How does the reclaim behave with workloads with file backed data set > > not fitting into the memory? Aren't we going to to swap a lot - > > something that the heuristic is protecting from? > > > > In common case, most of the pages in a large file backed data set are > non-executable. When there are a lot of non-executable file pages, > usually more file pages are scanned because of the recent_scanned / > recent_rotated ratio. > > I modified the test program to set the accessed sizes of the executable > and non-executable file pages respectively. The test program runs on 2GB > RAM VM with kernel 5.2.0-rc7 and this patch, allocates 2000 MB anonymous > memory, then accesses 100 MB executable file pages and 2100 MB > non-executable file pages for 10 times. The test also prints the file > and anonymous page sizes in kB from /proc/meminfo. There are not too > many swaps in this test case. I got similar test result without this > patch. Could you record swap out stats please? Also what happens if you have multiple readers? Thanks! -- Michal Hocko SUSE Labs