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=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 68C79C10F27 for ; Wed, 11 Mar 2020 08:45:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 30C7F20637 for ; Wed, 11 Mar 2020 08:45:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30C7F20637 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 AA5B56B0003; Wed, 11 Mar 2020 04:45:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A56316B0006; Wed, 11 Mar 2020 04:45:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 993646B0007; Wed, 11 Mar 2020 04:45:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0186.hostedemail.com [216.40.44.186]) by kanga.kvack.org (Postfix) with ESMTP id 7DAC46B0003 for ; Wed, 11 Mar 2020 04:45:16 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 196328139 for ; Wed, 11 Mar 2020 08:45:16 +0000 (UTC) X-FDA: 76582447032.09.lamp85_2df7fe1199a36 X-HE-Tag: lamp85_2df7fe1199a36 X-Filterd-Recvd-Size: 3408 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Wed, 11 Mar 2020 08:45:15 +0000 (UTC) Received: by mail-wm1-f42.google.com with SMTP id g62so1118728wme.1 for ; Wed, 11 Mar 2020 01:45:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pRBMlMBO4NTBoT2wAbroYDijV50kCEx9++6sottZmCc=; b=ARk8IsozzukwrinbxxBxnBphGfXLmaINpDx4qIxjI/l5HWTvjfAETgR1Nh8qclgYVG cZg4pOH4OyBC2IyD38Aq1R6M6+Hu7YmsRKH+JMEiB5FGdzZ/aVgO3dDVLxaaBB6aR7GR t6oIZ/ittFK+YgmZkRVN2mELepSvAq22qNq7ymnX/LzcKQUOKJj40OCGUfxVXn6hsBOi v4KD+ttvhQeHDFOO3EvzQ3ZPyl303JL47V9Dv23NgeMuUOWTkVIS8xRsUDdY9SdeyPfg phZQcqXNwGdOKs5ty9JKGN8iWZ9dBXv6MDd50VsBtE/eAFfiYlImXFQJQ7vFVOyqem5g QOdg== X-Gm-Message-State: ANhLgQ3My1LwETwcqS1jfWXslktM72QA3Gc9bCCRvT/LS84d16odHcn/ q79vmV7sMsd/LT+eKt4npTM= X-Google-Smtp-Source: ADFU+vvWcCh1ENBrqTJkvzRy7OXTXHVBKkeQjnbgzUzLh601tXQ/IzCJON+i3FCQ5QVs/GRZD2pe0g== X-Received: by 2002:a1c:6108:: with SMTP id v8mr2523779wmb.58.1583916315039; Wed, 11 Mar 2020 01:45:15 -0700 (PDT) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id c85sm7752772wmd.48.2020.03.11.01.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 01:45:13 -0700 (PDT) Date: Wed, 11 Mar 2020 09:45:13 +0100 From: Michal Hocko To: Dave Hansen , Minchan Kim Cc: Jann Horn , Linux-MM , kernel list , Daniel Colascione , "Joel Fernandes (Google)" Subject: Re: interaction of MADV_PAGEOUT with CoW anonymous mappings? Message-ID: <20200311084513.GD23944@dhcp22.suse.cz> References: <20200310184814.GA8447@dhcp22.suse.cz> <20200310210906.GD8447@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. -- Michal Hocko SUSE Labs