Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1483721pxj; Fri, 4 Jun 2021 16:10:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrvIfOOBuNShlawFjFDoBGa+TCnao62aNPCw+U+k5Sdu5y5c+kQbdaRATEjgnu8yUoLLSs X-Received: by 2002:a17:906:53c9:: with SMTP id p9mr299390ejo.419.1622848202474; Fri, 04 Jun 2021 16:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622848202; cv=none; d=google.com; s=arc-20160816; b=xFpNt5DsFLXqNJc1kbCGMAWB2KRpurtWPHUkS4K5G0nfUwT1gYer1CqT5+3BOGhwTn CsNVgrKhhnmOWuJJ9zGmk9R2bqH70GPYeOnS1sUzWG1Q1hOAglWmJtEXK324TBVofnWi Y/hmPnVYjj2jvOgs7mtbGfXa9Te6pq4GzzLHjLYC+ypFXxYsNmFp39hNCTqesohCvmXi 1lh9rabPaAIbgxc6z0ddxCI74J1x0RHSg8vLiirypR0GCxeRLK6CW9f2+pQTbh8GPGg8 AgCr4Du9Jv0SBYm1NjOrEuZ3VT/zxnlUD6NGKiMEXfahYPugAm7chP8LW7GO2ji649kA 509A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=OB03ucavBIv1Fu1kgEzILIrohfiYiezA2Xid0FDJmDk=; b=esUZ3m4C0dgPjNGE/MKpqMwd/Adv/HxMx9H8culJhosAHzdzKOPZ5uoHfNTST0so3t K7QJHiBxy9wJHOvaiTP/EGTOLdzvpAWm6hUApLKzb0wNo7DeOmWq8Iy89Xx/ZZxQ7cPw ou/MEGO+j0Ojl7be3gtqHSwCb+cZrPzY8mKzAXF7VgjUt2c+/n9X+hPgPSInPmBxGV6g e8EYSb2pea8dO4kqo46qRgVUDGxo9oK6F0xloffaDEnI4aHWKouHvhu52Nuh12EgoBTQ LkWOolXY5KNXhrVrf8Q/Hzkpgcs4VPWUByzkBNusRqWR17L4qsq+LFleITfkdoFW8J0r WHEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HeKtaLiC; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si5655662ejz.525.2021.06.04.16.09.39; Fri, 04 Jun 2021 16:10:02 -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=@google.com header.s=20161025 header.b=HeKtaLiC; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231751AbhFDXJq (ORCPT + 99 others); Fri, 4 Jun 2021 19:09:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229853AbhFDXJq (ORCPT ); Fri, 4 Jun 2021 19:09:46 -0400 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19709C061766 for ; Fri, 4 Jun 2021 16:07:50 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id d21so11315411oic.11 for ; Fri, 04 Jun 2021 16:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=OB03ucavBIv1Fu1kgEzILIrohfiYiezA2Xid0FDJmDk=; b=HeKtaLiCGa6paPflJcTEDWoHzS6FrNqO1m/tyMIG/il/3UkirSRcdhIdMBKROLQAJr iyh2vXp58k6pThN6ZLrKPK7a8aioKhFv+3Q6R+iBd2S/rUI/9bg1ozNi682XrtPAmtjQ pK4InDy+1uObK5Oea/nx8znyGenF7ttf/X0qCtBDhsduxhbvZEFPIwJ9UOsatiB0KcGB azLOCYZijyxhH7VwlE0SwgG4M1Y9ZbZyFrOt/pP+6rJAyFcaON7yo4he7Akbbf/nuq2S tulPGYOzHd73IPXGeR1yxRoITA5oRyKTOYLx7Y129QHcfCFBHdOE2wMPDVMUgjn04NO2 cV6Q== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=OB03ucavBIv1Fu1kgEzILIrohfiYiezA2Xid0FDJmDk=; b=od3y45izbmLazRWbLkVeWAI3WBhXNo+E/mgl/Ux6BtfIipnAs524fkWWzdLwsi0//Y aYN1BIZQWesG0NXn2ObgCShy3+bL8B5MUcc8RoRPp7CaAxTupgm/25XDfpJ5uK8ba5qg e1AvOXmkk3WTWGt0HFJiqnVNkSLLhaSS8T0l8wJhaWanmS276cqS629wX13ZWmcLg5Sk N+LJfzMhGTs8pyPmIQPg1Cl7XbcjFOHEIfsy3bZvtMeA5OrDT1hqBh99DCSQ1BNU0aFh LACZ13BRwDceZQ4q6fXluR8vrsgItG2ukSeyJdPuR2vKXF6qqURnFAa9y+LHciLMvDWr aNzQ== X-Gm-Message-State: AOAM530bEo8XzDNFGxwFVv1TkYL6sI9Vgz7hk/FabVdrFj9JW6vAju+s lklJ4sbblVsa6eUvlmrNCX4AUA== X-Received: by 2002:aca:1e0b:: with SMTP id m11mr12204212oic.45.1622848069276; Fri, 04 Jun 2021 16:07:49 -0700 (PDT) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id l9sm715795oou.43.2021.06.04.16.07.47 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Fri, 04 Jun 2021 16:07:48 -0700 (PDT) Date: Fri, 4 Jun 2021 16:07:46 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: "Kirill A. Shutemov" cc: Hugh Dickins , Andrew Morton , "Kirill A. Shutemov" , Yang Shi , Wang Yugui , Matthew Wilcox , Naoya Horiguchi , Alistair Popple , Ralph Campbell , Zi Yan , Miaohe Lin , Minchan Kim , Jue Wang , Peter Xu , Jan Kara , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/7] mm/thp: unmap_mapping_page() to fix THP truncate_cleanup_page() In-Reply-To: <20210604163933.h6dj6cgr6tudpprd@box.shutemov.name> Message-ID: References: <20210604163933.h6dj6cgr6tudpprd@box.shutemov.name> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 4 Jun 2021, Kirill A. Shutemov wrote: > > I think adding support for THP in try_to_unmap_one() is the most > future-proof way. We would need it there eventually. Yes, I'd love to delete unmap_mapping_page() and use try_to_unmap(), but couldn't easily do it. I did cut out one paragraph which said: "Next iteration, I would probably refactor zap_huge_pmd() so that the same code could be used from zap_pmd_range() or try_to_unmap_one(); but that seems riskier and more trouble than this current iteration." And I've certainly not found time to go back and try that since. > > But this works too: > > Acked-by: Kirill A. Shutemov Thanks, Hugh