Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp479707pxa; Thu, 27 Aug 2020 07:32:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8GuRTJQZIRdprtviZctKjX/U65dOt22CR3uZKEY7i5Kt2e8+dgkYog6AvC0TNAuzT6QDm X-Received: by 2002:aa7:cfda:: with SMTP id r26mr20389430edy.209.1598538752459; Thu, 27 Aug 2020 07:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598538752; cv=none; d=google.com; s=arc-20160816; b=xaGoH5YHSUQF08saECtYGyxANGCoTpR8uCDs54GqA4cJxBRHx8lgtBQl/hPSRMM3Xy M4W9Xh3g0C94QFeJmxgO1uhHl+TgC9rRpPnNB2umDRnYvYdCVzRZl4WggoHbb9k3Jkhc uN7GW0saCEQVpG17fUT3uc947FjmhQgoqmP4gg12nAlrxBlrj7iO2Skdy9FSCzNlz6Q2 9unFwWW0A7/HJelkEn8GGv1vGWqoxOEIgiM+fAFo7S10RnuDpr2RPG6gA6TSVsG/bbZ8 QnoeVJd1sWI82nDVTSSFfwHT2Cj0riwC3drvJeaH1sx2YOih8krUNUsSqM19BkXXp/Zx ECWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=BmSkU8kL1DJIMf//B6UvwY8ukjXeH0WHbYlFQli5/Kw=; b=MO1a928mp+F+o/TiYXyrazGDNOaWSpjC4MxhsoNost0/HZsepC9Oavt/BpsQfLYrgQ Vt8XAN/9jqCscmRODhBIZkRa/sWvzNx6nVYTpwLRMRdrQklga2JeXUoxt5NM7PHNmOZ5 EXNbLyX77Q7vhHlQ5yssl7Hys0yD8oG7cAkI6+JHK+L8ZwGs39lcia8xd5tcSXcWdQ2s Nt5nWZEyzRkeSwfh7vNDvz8K4MoUIFMucFM7kwTw2vCsBHBsVev2hM8cwJsT/yvbgc31 5x6hlwLOG8X5hzQlK60xCtJRzOyNsGtRvb/+/JmjyRfIAEtxvq2Rz8+ZCMFjxqOJFZEW rykA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=KPqGwrms; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e20si1440799ejr.438.2020.08.27.07.32.10; Thu, 27 Aug 2020 07:32:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=KPqGwrms; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726087AbgH0Oaq (ORCPT + 99 others); Thu, 27 Aug 2020 10:30:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727926AbgH0OX4 (ORCPT ); Thu, 27 Aug 2020 10:23:56 -0400 Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A3F7C061236 for ; Thu, 27 Aug 2020 07:23:47 -0700 (PDT) Received: by mail-qv1-xf43.google.com with SMTP id o2so2669229qvk.6 for ; Thu, 27 Aug 2020 07:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BmSkU8kL1DJIMf//B6UvwY8ukjXeH0WHbYlFQli5/Kw=; b=KPqGwrmsmOIuf+JiWEW/k7gGWQ1y3K+MpxQ+GlJBR4JHV9vGFTTbjyFMl+FZ4Y0eR1 K2BXbisksDsJdOWmVO1uqUYQ2h1rz6x4zhmDciS7F7QXhAv9oK2efTTjrKFY2lV0MX2h m+NX4PEHBJLAtiNCQ+E62vD9YoMqRVe4nQ2rLdY2M6j+IN9GUIPk+F93i5PMufggiU+5 7qfQtxk5IGmbE2ZD7qvuDqJQO8zKxEiYo6gkbc90Yi69wGk+9eBBpz/JoSeL/G/aFyFt vrKHByeeVrxLF5cwGuOVUkygA2VuBjAX42oiZQSqxkRduIvG36gg5Hfhjg+H7Ukg95zP RpMg== 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=BmSkU8kL1DJIMf//B6UvwY8ukjXeH0WHbYlFQli5/Kw=; b=JxehEUdDMIdNq5ku6L5lgfPGFZgywEm0TH3YYC+CfMBimpG3FeUncw5bABKLHtKaAk y5hy4tvYQjxHbZoK3X5CepYnoE8hunx93gWpfSRRtIM3QOiVnK0gkPI5+y8g4q/cuV20 3rsxegXwYXx7w2HdiPhy2qWcn215BTq+6kEKRfiLwEnMoTs3cEDRnwVHA4VET/6aWyNs +sNiwnWnyAMln0gFafZ+5wla0mI8Dz2ePIW/D0t7CmhDUjib1dYPX1Abs8Qmrt78lZeS tGZ9qzUGw/OB5DkuO/uzFeaa4sZUB9G75Pd+58nste94s2m69CYMXX3yDUsCSrS197rA DVMw== X-Gm-Message-State: AOAM531YWcYIyAdPz2gTKI4evaEmuL8+AhMz5xBZb6yrnAc+Vlk6YVax WEgDCBOiy4njRZ189zDYCfD5ow== X-Received: by 2002:a0c:ffa1:: with SMTP id d1mr19299175qvv.36.1598538226887; Thu, 27 Aug 2020 07:23:46 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:412a]) by smtp.gmail.com with ESMTPSA id l64sm1953780qkc.21.2020.08.27.07.23.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 07:23:46 -0700 (PDT) Date: Thu, 27 Aug 2020 10:22:29 -0400 From: Johannes Weiner To: Matthew Wilcox Cc: linux-mm@kvack.org, Andrew Morton , Hugh Dickins , William Kucharski , Jani Nikula , Alexey Dobriyan , Chris Wilson , Matthew Auld , Huang Ying , intel-gfx@lists.freedesktop.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/8] mm: Use find_get_swap_page in memcontrol Message-ID: <20200827142229.GB1002856@cmpxchg.org> References: <20200819184850.24779-1-willy@infradead.org> <20200819184850.24779-3-willy@infradead.org> <20200826142002.GA988805@cmpxchg.org> <20200827125941.GG14765@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200827125941.GG14765@casper.infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 27, 2020 at 01:59:41PM +0100, Matthew Wilcox wrote: > On Wed, Aug 26, 2020 at 10:20:02AM -0400, Johannes Weiner wrote: > > The refactor makes sense to me, but the name is confusing. We're not > > looking for a swap page, we're primarily looking for a file page in > > the page cache mapping that's handed in. Only in the special case > > where it's a shmem mapping and there is a swap entry do we consult the > > auxiliary swap cache. > > > > How about find_get_page_or_swapcache()? find_get_page_shmemswap()? > > Maybe you have a better idea. It's a fairly specialized operation that > > isn't widely used, so a longer name isn't a bad thing IMO. > > Got it. find_get_incore_page(). I was going to go with inmem, but that > it matches mincore sold me on it. > > /** > * find_get_incore_page - Find and get a page from the page or swap caches. > * @mapping: The address_space to search. > * @index: The page cache index. > * > * This differs from find_get_page() in that it will also look for the > * page in the swap cache. > * > * Return: The found page or %NULL. > */ Nice work, that's perfect. > I was focusing too much on what the function did, not why it was doing it. Me too.