From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FSL_HELO_FAKE,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C915EC2BB1D for ; Wed, 11 Mar 2020 22:02:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A7A2D20756 for ; Wed, 11 Mar 2020 22:02:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FpIFqf52" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7A2D20756 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 911BA6B0005; Wed, 11 Mar 2020 18:02:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C2976B0006; Wed, 11 Mar 2020 18:02:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D7C36B0007; Wed, 11 Mar 2020 18:02:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id 627B46B0005 for ; Wed, 11 Mar 2020 18:02:46 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1EFD52C0D for ; Wed, 11 Mar 2020 22:02:46 +0000 (UTC) X-FDA: 76584456732.28.band60_181e1210e605c X-HE-Tag: band60_181e1210e605c X-Filterd-Recvd-Size: 4368 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Wed, 11 Mar 2020 22:02:45 +0000 (UTC) Received: by mail-pf1-f181.google.com with SMTP id u68so2126434pfb.2 for ; Wed, 11 Mar 2020 15:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3iE2aDq3GTpvrSPuFDVQi35URZrSY5lu16FU58AXYfg=; b=FpIFqf52l4N0Bk/gaxJ14yLDj94qCfKyrcTpcFNDiURdFNH0NC/dnSCXnb38EFA773 y2NhcaRzUDo+YFDy+PdU8XIH6nV7zEfPq4943R3UKpoFa79ze6YFdL9SsZRkBIPhPfUa mv4AD1GrmzS0MHSZmORWkG+sQ8koe5Nzan6dEWhXo5SrcohWY0jDN3R1gHDoJLpE0f2P YEUgYoI9ZdMvgW6I9gJRx2L5ruWyQfibF5wN5bkpgvtK1+WEh9pUhHtq4hkzDizBqY95 nLozpnJGhD7q/vhRKbKF7dkog4oXh37yfubqAFxD32DAQWX/RSr9HtporoowTU9PDaTr H2UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=3iE2aDq3GTpvrSPuFDVQi35URZrSY5lu16FU58AXYfg=; b=t4tVeXyfggb6wycoa4aJCmumkpigMw9An6rkkcxnzBoy3G0Dv+viqTwJzVnXHVRYLh 65tSpSw/+Xh+efmOLVwDCwCQFpc8W8zZkeioGEZti26lhdbyhXgP27XZBy6ljH6OBLZ3 UMt7UGnacWTNooIQM3y35/n+0s6UgIX/6nnltzKr35OABOtM6wcHlmpfsVQcGCt+SxLi U1USnd8q8GWCOIGzk5nGZSm/4oQeaZSiIPsZbqi9d3QntgoiKiSbds18S/n58XzRcoGM KN1eVVZub8UtrUovTxVhqadtT8cV2wDJt7A9EXtkBZG4MoEJnJWHLUCzXORKLOcHARM/ xaiQ== X-Gm-Message-State: ANhLgQ2Tt4Oq+r8U7UP0LCSjq2k/jOjTtk/49XyJD1mqUguJsbd37TFR Hmlnl8MzS6nWiMi8PsEFz30= X-Google-Smtp-Source: ADFU+vtmGxg9TwVB1VBj2GMpXmCb7ujUpMkxwfLzu1g/Ntf3tf2h6zt1i1H7Sa8ZUQsRk15Ro/Sr7Q== X-Received: by 2002:aa7:9906:: with SMTP id z6mr4997401pff.112.1583964164216; Wed, 11 Mar 2020 15:02:44 -0700 (PDT) Received: from google.com ([2620:15c:211:1:3e01:2939:5992:52da]) by smtp.gmail.com with ESMTPSA id c18sm50034963pgw.17.2020.03.11.15.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 15:02:42 -0700 (PDT) Date: Wed, 11 Mar 2020 15:02:41 -0700 From: Minchan Kim To: Michal Hocko Cc: Dave Hansen , Jann Horn , Linux-MM , kernel list , Daniel Colascione , "Joel Fernandes (Google)" Subject: Re: interaction of MADV_PAGEOUT with CoW anonymous mappings? Message-ID: <20200311220241.GA252592@google.com> References: <20200310184814.GA8447@dhcp22.suse.cz> <20200310210906.GD8447@dhcp22.suse.cz> <20200311084513.GD23944@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200311084513.GD23944@dhcp22.suse.cz> User-Agent: Mutt/1.12.2 (2019-09-21) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Mar 11, 2020 at 09:45:13AM +0100, Michal Hocko wrote: > On Tue 10-03-20 15:48:31, Dave Hansen wrote: > > Maybe instead of just punting on MADV_PAGEOUT for map_count>1 we should > > only let it affect the *local* process. We could still put the page in > > the swap cache, we just wouldn't go do the rmap walk. > > Is it really worth medling with the reclaim code and special case > MADV_PAGEOUT there? I mean it is quite reasonable to have an initial > implementation that doesn't really touch shared pages because that can > lead to all sorts of hard to debug and unexpected problems. So I would > much rather go with a simple patch to check map count first and see > whether somebody actually cares about those shared pages and go from > there. > > Minchan, do you want to take my diff and turn it into the proper patch > or should I do it. Hey Michal, It would be great if you could send it. Thanks.