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=-19.8 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=ham 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 ED11FC4743C for ; Fri, 4 Jun 2021 23:08:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE1B2613B3 for ; Fri, 4 Jun 2021 23:08:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231773AbhFDXJr (ORCPT ); Fri, 4 Jun 2021 19:09:47 -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-Google-Smtp-Source: ABdhPJwycqr3uyfkRirLbiJnEhGc0fdxusGBrAkbhpvq6AIbRai4YVZslFrHUpaMXjKSGuSSvuPQsA== 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 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=-19.8 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 84E68C47082 for ; Sat, 5 Jun 2021 05:30:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2CE9C613F1 for ; Sat, 5 Jun 2021 05:30:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CE9C613F1 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C452B6B0036; Sat, 5 Jun 2021 01:30:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C1B6E6B006E; Sat, 5 Jun 2021 01:30:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ABCC76B0070; Sat, 5 Jun 2021 01:30:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0002.hostedemail.com [216.40.44.2]) by kanga.kvack.org (Postfix) with ESMTP id 79ED96B0036 for ; Sat, 5 Jun 2021 01:30:39 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E6FC252B7 for ; Sat, 5 Jun 2021 05:30:38 +0000 (UTC) X-FDA: 78218545356.26.9FBF7B6 Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) by imf30.hostedemail.com (Postfix) with ESMTP id 91A69E0004C7 for ; Sat, 5 Jun 2021 05:30:38 +0000 (UTC) Received: by mail-oi1-f178.google.com with SMTP id v142so11548636oie.9 for ; Fri, 04 Jun 2021 22:30:38 -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=VDMZtJu/DCEho5Aneq7mBG6GU+CI+omf80+NuSxloVNefDVbLEufbujuJBva2HYpaK 78pVwngXSojc+WcuelnuBd/2R15xdD4bj2oWXa/1ikhsieNoG4qv6SNb5iKWbDGZJ+vB R3W0OepEmraxXyljZXmDTnUftVikOhRtUFuJ6z3grdpsiouY6dYdc+q8P94zXH80jG2i n9iUu99Y+8fndZJkg87uZAGjbvUk30oNj7/ew1RBYzgWXXWTs92YTSGsb/AMTua6trNb O0aIkYq4CFnBYZnqFdoPW2knHA6N+uRhnfIKeVQxB/Dwvn7ii6uOMtQFGgLo6m2jhiRR kRcg== X-Gm-Message-State: AOAM533VeeIAaEmDtdvneAagn8A2aE5Y7Rl4Our04Kc/rORKdxs0FbHW 3K+PpBj9+PhU2qfdoL/o32qxxVp4bzlS/A== X-Google-Smtp-Source: ABdhPJwycqr3uyfkRirLbiJnEhGc0fdxusGBrAkbhpvq6AIbRai4YVZslFrHUpaMXjKSGuSSvuPQsA== 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 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=HeKtaLiC; spf=pass (imf30.hostedemail.com: domain of hughd@google.com designates 209.85.167.178 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 91A69E0004C7 X-Stat-Signature: qm3z8ifpkmw144k3e43hujnpm3dpn8zh X-HE-Tag: 1622871038-768826 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 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