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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A9C0C6FA82 for ; Fri, 2 Sep 2022 18:52:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9B739800E1; Fri, 2 Sep 2022 14:52:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 93FD5800DD; Fri, 2 Sep 2022 14:52:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7B9C7800E1; Fri, 2 Sep 2022 14:52:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 67F24800DD for ; Fri, 2 Sep 2022 14:52:51 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 45D011A0A09 for ; Fri, 2 Sep 2022 18:52:51 +0000 (UTC) X-FDA: 79868042142.13.42DEB34 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf26.hostedemail.com (Postfix) with ESMTP id BCFB814006F for ; Fri, 2 Sep 2022 18:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662144770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k4TiRf0SYDNoIr2Qg83a5142/XxU9MROZO10TeEUAQY=; b=FXSuV2tl+olS8+HXaXphawjnm3roukc1tob1Z948IwwgGBHDzbkEH595vf4XDoU2oSdgsy bCc2hvKPEAYg+VqvX0dTr9JczJesHc3mBkSoD6Ae0fQGJdkHtMRTmCweGfPhaLKnwfIrjU p3z7c8BBQoKnH4z+uBJD/I9Oq0rSoKM= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-281-g3lHyeGMOXudO1MhWB3lqg-1; Fri, 02 Sep 2022 14:52:49 -0400 X-MC-Unique: g3lHyeGMOXudO1MhWB3lqg-1 Received: by mail-wm1-f70.google.com with SMTP id j19-20020a05600c1c1300b003ab73e4c45dso998130wms.0 for ; Fri, 02 Sep 2022 11:52:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=k4TiRf0SYDNoIr2Qg83a5142/XxU9MROZO10TeEUAQY=; b=NYHjig1I4CSJa9EeoAcj6763ygEQ9CUJEUFOKbDjFYLv8vVgMC+1zCtMPDIsl+6k7n JtdenRKeSn6aTGrx2E5YYAfldig4RhnTxflG9zQWqJ0hGbhCD1O7kGJaHG4PqA/fGGyi jTZfzT1txgAhYf3xk4KsmisarlQirRZsWhY+nqLSn7qHzErWTE2SRtf/LMCfndSPWsre pyN1xTAcEDcxk5dGQ6g3FwymKJ7fI/e+EZpZGS7EpOq6H+2cEAIO1lKUpk3SUGObeRGM SjjMd/jYoQGI0oklzq1vWfQBy6LUI3OXM6yfCgEPSRdUbA4UjnR95v8knJaHa9osk2+e 2N/w== X-Gm-Message-State: ACgBeo2iW3X1S6NzPyvi+JFgNbbOU0HpnC7fff6QbgY7Daf4y7/IPy86 O36/btZ5zc1wlNyh5IuBaFZffKeq1mZlVb3bqo8bwRhJhytu5brrmi4ueEZMabn7eeMckg6g1MV xYNE4Ly4Sf5g= X-Received: by 2002:a5d:40cd:0:b0:225:7425:fac1 with SMTP id b13-20020a5d40cd000000b002257425fac1mr19658353wrq.30.1662144766610; Fri, 02 Sep 2022 11:52:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR4m3+y82b79Pf+1VPmj4J4yz70TJmSB+VPJmpDbZTLR4/wtAfynWCAurYqCUT7Y7G5Q5TLdcA== X-Received: by 2002:a5d:40cd:0:b0:225:7425:fac1 with SMTP id b13-20020a5d40cd000000b002257425fac1mr19658336wrq.30.1662144766329; Fri, 02 Sep 2022 11:52:46 -0700 (PDT) Received: from ?IPV6:2003:cb:c714:4800:2077:1bf6:40e7:2833? (p200300cbc714480020771bf640e72833.dip0.t-ipconnect.de. [2003:cb:c714:4800:2077:1bf6:40e7:2833]) by smtp.gmail.com with ESMTPSA id n18-20020a05600c501200b003a32251c3f9sm10099660wmr.5.2022.09.02.11.52.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Sep 2022 11:52:45 -0700 (PDT) Message-ID: <323fdb0f-c5a5-e0e5-1ff4-ab971bc295cc@redhat.com> Date: Fri, 2 Sep 2022 20:52:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] hugetlb: simplify hugetlb handling in follow_page_mask To: Mike Kravetz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, inuxppc-dev@lists.ozlabs.org, linux-ia64@vger.kernel.org, Baolin Wang , "Aneesh Kumar K . V" , Naoya Horiguchi , Michael Ellerman , Muchun Song , Andrew Morton , Christophe Leroy References: <20220829234053.159158-1-mike.kravetz@oracle.com> <608934d4-466d-975e-6458-34a91ccb4669@redhat.com> <739dc825-ece3-a59f-adc5-65861676e0ae@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=FXSuV2tl; spf=pass (imf26.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662144771; a=rsa-sha256; cv=none; b=1O071j8BiNe9dyD9lvuLE3mrTPmojFm2LTYGxsOTeJoegKZczrkZnj5Hk2ZLKJxy40dMln fxPGlkxV2En56QNxuzLHpyeRQt/impMArMX02ZEV9vfbflXlntFMScRXSUplgxRF9TmDup KIUM0WWTL/1Sg0zFQvzrjYqvDn0ihnk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662144771; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=k4TiRf0SYDNoIr2Qg83a5142/XxU9MROZO10TeEUAQY=; b=27QkSfT8uhGcLLlRiiF9IJ1oY7Zl81Hny7QugjbmGFR6GVVvdBj1tJNGZ4oqi35FYvyqq+ rsk1wfQYPPc1Twb9cULv9J/UaMCxoeayUXnH2Tf+0D4jFr7qp6z2OHzx2m7zUchEB8LOjA KgUEyYIUNWoFkokLq79k+C57i2ZCPqk= X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: BCFB814006F X-Stat-Signature: 77ru1c873yrcww73upi6xaj981h1ijpz Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=FXSuV2tl; spf=pass (imf26.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1662144770-270423 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: >>> Adding Christophe on Cc: >>> >>> Christophe do you know if is_hugepd is true for all hugetlb entries, not >>> just hugepd? >>> >>> On systems without hugepd entries, I guess ptdump skips all hugetlb entries. >>> Sigh! >> >> IIUC, the idea of ptdump_walk_pgd() is to dump page tables even outside >> VMAs (for debugging purposes?). >> >> I cannot convince myself that that's a good idea when only holding the >> mmap lock in read mode, because we can just see page tables getting >> freed concurrently e.g., during concurrent munmap() ... while holding >> the mmap lock in read we may only walk inside VMA boundaries. >> >> That then raises the questions if we're only calling this on special MMs >> (e.g., init_mm) whereby we cannot really see concurrent munmap() and >> where we shouldn't have hugetlb mappings or hugepd entries. >> > > This is going to require a little more thought. > > Since Baolin's patch for stable releases is moving forward, I want to > get the cleanup provided by this patch in ASAP. So, I am going to rebase > this patch on Baolin's with the other fixups. > > Will come back to this cleanup later. Sure, no need to do it all at once (I was just bringing it up while thinking about it). -- Thanks, David / dhildenb