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 911AFC4332F for ; Fri, 9 Dec 2022 00:43:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA7D68E0003; Thu, 8 Dec 2022 19:43:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C30CC8E0001; Thu, 8 Dec 2022 19:43:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AAB668E0003; Thu, 8 Dec 2022 19:43:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 97E098E0001 for ; Thu, 8 Dec 2022 19:43:46 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 69C3040FE9 for ; Fri, 9 Dec 2022 00:43:46 +0000 (UTC) X-FDA: 80220920052.06.E18362E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf18.hostedemail.com (Postfix) with ESMTP id 326F91C000E for ; Fri, 9 Dec 2022 00:43:44 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="MPRs/4N/"; spf=pass (imf18.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1670546624; a=rsa-sha256; cv=none; b=L3Y2rCjnwayLZBiNsl4RLURzfZ5BwE/BQeoP+KNDMmXitWMe0P+MONNvvQbp0HO6mdmRCC gWDXnI3D2Ncqolu8RbOquipYLwlaYRoSE7sZIluWh6ccdsVO5XHDnFPw8N0uhz7eya7ctb u2QF1Rgku2dy10O6QjD+ga7qNkKqsdw= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="MPRs/4N/"; spf=pass (imf18.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1670546624; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=QOQAgPN2OM3Qoh4w5J3XT6I3W+H9FIcVJ7CHfGCLLVU=; b=1YUpiNoglrd5UhLJCe+jKQ3ka2V+OAS6aaLFrV84xyOh4TT5MAEkYtL1C29R3Hz6rexihP MktgePzRtAlgJ5i2A0Bl9saWttl53hQevOL19S66pz3qFwHbzlD0r1RWnkNLowb4t6qEq6 H9qmCamGJx4rjuio9U4oYUopZ8XDFQU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670546623; 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: in-reply-to:in-reply-to:references:references; bh=QOQAgPN2OM3Qoh4w5J3XT6I3W+H9FIcVJ7CHfGCLLVU=; b=MPRs/4N/KtEcX8nRC+v/uBWGUCq1Me33CwOtdVizEGkdq0c/jPaoZULQc9xptGYU0iAmTL KK2PXZvDlrdcfaxTU35ARFwi947NqUoRsp9yzJ9O4THZNpJOrHY8PYN2sx34fJxJ6/BTvt UH85qUgUaIMK1xsRksEUeuU0UuupTLw= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-532-ipGZlfk1M6mdn1H0Jp92yw-1; Thu, 08 Dec 2022 19:43:42 -0500 X-MC-Unique: ipGZlfk1M6mdn1H0Jp92yw-1 Received: by mail-qk1-f197.google.com with SMTP id j13-20020a05620a410d00b006e08208eb31so3438868qko.3 for ; Thu, 08 Dec 2022 16:43:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QOQAgPN2OM3Qoh4w5J3XT6I3W+H9FIcVJ7CHfGCLLVU=; b=PM9exEGsshOUC8YYgVE/DKXnXkiXO38ThEtHO7nGs+nNasOkX6JEgrqHEZli4G76Na 3OH9BkBSLRXeAVr8sorHUpLt6WsMTbPt32ZLv9oC6b5SJTJnBNlhFoyWhfxP53DqWbl8 +rV0LaO0BKL92BkICJqXdFlEbDCcu97Ohgce0jNAGdNLJWvqp4mbYCyupUnGSjMQoz7v IkZyEcIEIo/wm1WIGixZwxTJi+ifLFhJHhq5nUi0fDRZAYoz3A+RUCs2QqC/ovMMhqXt S3HPyqw+ZPzKbFAW96Q7EF6gQP+fEpXCcRMOz5WyvaghhWDz9i/Tr+LHqeIObVaPARU/ eE5g== X-Gm-Message-State: ANoB5pmyXkAP28J8KIThRC+Kx8ShE1vX9x7r3LQm6i0avStigFNYtpfH I4IdWmxrIFJj2fiBIIn5k/4AmK9dEzj7uUZCfiH06kXVC0s+9wxBeAuhZjqkEDPf9Endsofjfe/ yQcx8oFYpvc8= X-Received: by 2002:a05:6214:4283:b0:4c6:99cb:347 with SMTP id og3-20020a056214428300b004c699cb0347mr6739388qvb.38.1670546621698; Thu, 08 Dec 2022 16:43:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf6vNPXFnBfP41Kw3F4yG2Y/tCEvs98o4Mwa9bR+8CQc/ImHAQskUQTptwE7im0S7QmgyTtJ4A== X-Received: by 2002:a05:6214:4283:b0:4c6:99cb:347 with SMTP id og3-20020a056214428300b004c699cb0347mr6739369qvb.38.1670546621489; Thu, 08 Dec 2022 16:43:41 -0800 (PST) Received: from x1n (bras-base-aurron9127w-grc-46-70-31-27-79.dsl.bell.ca. [70.31.27.79]) by smtp.gmail.com with ESMTPSA id q23-20020a05620a2a5700b006fcc6d9a626sm13577487qkp.78.2022.12.08.16.43.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 16:43:40 -0800 (PST) Date: Thu, 8 Dec 2022 19:43:38 -0500 From: Peter Xu To: John Hubbard Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jann Horn , Andrea Arcangeli , James Houghton , Rik van Riel , Miaohe Lin , Nadav Amit , Mike Kravetz , David Hildenbrand , Andrew Morton , Muchun Song Subject: Re: [PATCH v2 10/10] mm/hugetlb: Document why page_vma_mapped_walk() is safe to walk Message-ID: References: <20221207203034.650899-1-peterx@redhat.com> <20221207203158.651092-1-peterx@redhat.com> <6a970de6-e3da-f57d-14fd-55f65ddcb27d@nvidia.com> <61751d01-2ba4-efc0-9cb8-eeeb3d70908d@nvidia.com> <7f3096c5-c3cc-4ead-7c5e-8bade6c930da@nvidia.com> MIME-Version: 1.0 In-Reply-To: <7f3096c5-c3cc-4ead-7c5e-8bade6c930da@nvidia.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspam-User: X-Rspamd-Queue-Id: 326F91C000E X-Rspamd-Server: rspam01 X-Stat-Signature: h3nwr9ydpmq7umjnd5b7bhxkqdwxiypg X-HE-Tag: 1670546624-668445 X-HE-Meta: U2FsdGVkX19z97AUZ8IBlX5MBrDP4U+I6zIb7qRoCBXC+7eioEocviiTCDy3qlBWXZPprbo9/ODbpjOqDaN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ajEVbr1+A7uArLqAhfI4V5NyMySPdve2DQQNSlh6UxBTOEsj58ywVpxAM5Ztrdkh7jAJr9qf1eI8uiaOt 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 Thu, Dec 08, 2022 at 04:24:19PM -0800, John Hubbard wrote: > It does! And now for the comment, I'll think you'll find that this suffices: > > /* > * All callers that get here will already hold the i_mmap_rwsem. > * Therefore, no additional locks need to be taken before > * calling hugetlb_walk(). > */ > > ...which, considering all the data above, is probably the mother of > all summaries. :) But really, it's all that people need to know here, and > it's readily understandable without wondering what KSM has to do with this, > for example. I'm okay with the change. :) I think what I'll do is I'll move part of the original one into commit message, and take the new version in the code. Thanks, -- Peter Xu