Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp316979ybi; Fri, 31 May 2019 01:52:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzv4p/VBO7YFQqsr2yPMDvWaDQ14sf/5U68GVd7NiwUtv1T/PJBEFWxE83rI41hoJAOFbrg X-Received: by 2002:a65:6256:: with SMTP id q22mr7779191pgv.190.1559292746548; Fri, 31 May 2019 01:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559292746; cv=none; d=google.com; s=arc-20160816; b=MjULkKqLmXdBo8zlC8grpsXoAVURLrSV8a2tIY2HCX4KyiyXPilRSUoQHDTAqb30Z1 dWmYHlCMypjEktoA/LyhVatWelHQXaoA8fD2ysBRmPelNHY/xld7GAdjqJ1gLgYk9d7P svTX3o7NlIC0c5ivuVFGqYaLWMIJIlekwbbrhcBUpLt/OV6+kWa8RpEStT63A4wYsIUJ RhDCaLGaMhScfPJHFW8bREEFuUWl3LaNenWlFmmltq1KFHwVx6SVlvSHHAsS3zE5WvDh LpCTySDyYYiP3PkDpQ1/ZZjwQDaBbVM6xkuZdzRhoIopUDS0/0KbIikIOkF/T78lmCNP 2QFg== 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=Jai/c1DPn86hELIM2uJHklMp6HBcuf60Wda5Y6RSn4I=; b=qi61caowcYNQ6+V7vG6S7KmzLKwxqE+9EU67e3dJzM3HLW3CtCWGwJ0DCPhgWflk8c jTveOUYp7weCiLBKrsSXYmL96vq2JR6yYhk/bAc89V8ITD+FHhARZZJb1ilqlhPN5sI0 2sZZY2Wg0r1ASVeeQvPbGP54T4Ud6TQp20igHfrDqcCF45vLMerVWdl9h+xxTGtBgVzE shiNm6VSBEjEmUpc+0JWjw3lThYmWQiuorMGCHPzByra34BVqjqAbpFbhbp91D3YQPnB QLGhOg5VliJZOb/PCWTv7fXVsOEjSSOQv8eo8EUc3omrv25JUbtCnSZoVAXziZf/C1lC IQDQ== 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 d19si5935784pfr.70.2019.05.31.01.52.10; Fri, 31 May 2019 01:52:26 -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 S1726991AbfEaIus (ORCPT + 99 others); Fri, 31 May 2019 04:50:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:56026 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726158AbfEaIur (ORCPT ); Fri, 31 May 2019 04:50:47 -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 2BDD5AF55; Fri, 31 May 2019 08:50:46 +0000 (UTC) Date: Fri, 31 May 2019 10:50:44 +0200 From: Michal Hocko To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , linux-api@vger.kernel.org, Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Daniel Colascione , Shakeel Butt , Sonny Rao , Brian Geffon , jannh@google.com, oleg@redhat.com, christian@brauner.io, oleksandr@redhat.com, hdanton@sina.com Subject: Re: [RFCv2 3/6] mm: introduce MADV_PAGEOUT Message-ID: <20190531085044.GJ6896@dhcp22.suse.cz> References: <20190531064313.193437-1-minchan@kernel.org> <20190531064313.193437-4-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190531064313.193437-4-minchan@kernel.org> 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 Fri 31-05-19 15:43:10, Minchan Kim wrote: > When a process expects no accesses to a certain memory range > for a long time, it could hint kernel that the pages can be > reclaimed instantly but data should be preserved for future use. > This could reduce workingset eviction so it ends up increasing > performance. > > This patch introduces the new MADV_PAGEOUT hint to madvise(2) > syscall. MADV_PAGEOUT can be used by a process to mark a memory > range as not expected to be used for a long time so that kernel > reclaims the memory instantly. The hint can help kernel in deciding > which pages to evict proactively. Again, are there any restictions on what kind of memory can be paged out? Private/Shared, anonymous/file backed. Any restrictions on mapping type. Etc. Please make sure all that is in the changelog. What are the failure modes? E.g. what if the swap is full, does the call fails or it silently ignores the error? Thanks! -- Michal Hocko SUSE Labs