Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp448323rdh; Thu, 23 Nov 2023 08:10:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUYx+Oc8vXW7LXprQY7Nq/yNLkKHr5z41MOywrvcYtHpaxJ8ebTiXQvBc8sbUSyTmr2KR3 X-Received: by 2002:a17:903:4d4:b0:1cf:636f:1bf8 with SMTP id jm20-20020a17090304d400b001cf636f1bf8mr3623452plb.24.1700755826448; Thu, 23 Nov 2023 08:10:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700755826; cv=none; d=google.com; s=arc-20160816; b=YCf+nYh6w3IyptopsaVmrrBoiTG//i9jUh8qhQt7h4K9VHfiYVeazgvqzMKTKhOLpu yBZrXps11fFZojI5rKeTYjpGa2Lv/GyfKShAkWuyjt2LuLum90gmyBaqISMtl0HemcY9 ufdweDpWfhDVPhlq0e0SWM+fGgtLGRQ24LCAqLgT15R9wARVa/sxu/cRVTgPwgktMP32 spCbyHJFjURpBtIv7nIY0Bac5OW0iTq4KRvFtkGG41ErlSSSB4GUaYFCLQOlt4sFWfzI /QIRG0dsOxMWgL2d+co2STaPtJCtotmlmlsKk6csX+A45Y4Dx5trIZ0WiC9gDH7RI6+P BKJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lyyvUshat2fP97k91On5bJICBhysTXujJ3DjXRepMqQ=; fh=IWrKbpoLTVzPb0+r1p/DZVVOWDvjs8czNeWaRL0gwNI=; b=RtnUrAZDa32tCOmRs0Ij60qRqlH5Mj5r5ItJ5eb9rQSedLfbFJ3AXBiiz28AO1tlxh K7G0DknrLC33VRY5IEqbpYfeliao/EpuJHApBP5TNrrq/eiP7ycntHrDxe7Mi6cpU+Z/ frvQDX35Tctv1zfGxUBJDfAsFpeZ5pC/A8XHg6udCBkG/U+nqtl49rw51WoJ25btSDpH sl1Bwseq7kH5Pajen+spBM2OHDqtB6a48SxSldRBpvZJLTtMtZSqsaAkKWc+GMEtuJ5E iecpkNCKsNubWW4CsrB+fgyD8fNpDd3iBMrQNCPCOuB67XZanv7zfMk2px6HQThraWIo oC8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HM7aL4Ud; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id b18-20020a170902d51200b001ce64a095c2si1476074plg.361.2023.11.23.08.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 08:10:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HM7aL4Ud; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 93DAE806675F; Thu, 23 Nov 2023 08:10:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344931AbjKWQKA (ORCPT + 99 others); Thu, 23 Nov 2023 11:10:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjKWQJ7 (ORCPT ); Thu, 23 Nov 2023 11:09:59 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8D7B1B3 for ; Thu, 23 Nov 2023 08:10:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700755805; 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=lyyvUshat2fP97k91On5bJICBhysTXujJ3DjXRepMqQ=; b=HM7aL4UdaJPN9kzsTjsx5lIWD5RI+bdsfJ8UVtsa8f+UdCQWXZAvDCN7gCK6wA1arHTo7u O6dUWlo0lBbECk7axSFZGdDzO9ElZQdu5z4VIXojQHSMjySUtMxvU15bCUadoSWD9adxdL GhOUaWj24Drwyw90iMUzhifIUqJt0J0= Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-84-c2vJVXAvP1yB1jlI15ITpA-1; Thu, 23 Nov 2023 11:10:03 -0500 X-MC-Unique: c2vJVXAvP1yB1jlI15ITpA-1 Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-58737e284f4so175283eaf.1 for ; Thu, 23 Nov 2023 08:10:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700755803; x=1701360603; 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=lyyvUshat2fP97k91On5bJICBhysTXujJ3DjXRepMqQ=; b=iGn7UWcf1rgqSv+W0mvdPjGdh2dix3jjF8Ys8O92FRmjAiWbCWAJlbUTQqq0Z8adsZ aPNB03ZAKKshwe4yjNcqUbyoF75yGMYag7uQ9+5qAfBkvQU4q0rF5RKE/OweAg4JSyOQ gwu83td5hXlFls3ZnAdOzQpR+1tlrI8bnE2jW4gNIw5fDoa5/ko6lynEV5vCmhvRt/hy +7I+wdBJmz1xX6aL6jcrC7yLyO11rA/gHFpA2GHLOfLEfKJUygRkTjifZFlMZ6VUfTe0 ujYkTIcljqx/mP0WaK8c9351DzsmPYbDC/Wv3lqfKyBGuhog6vwbMwxATpDr6nb3cWE7 q+Dw== X-Gm-Message-State: AOJu0YzbQ3OE/7kNpJhXCglQlSezevFKCZ/8LTxlnmfWFtzgXa9dnWZM 5Ex6bInmmIlPCFu1MlzPBpZ8Y0o984u64TTiXTvsM2Gu1NTmS/bDvRADFfyz7cZ7rHAGv8+aghE NXt8mmZgu1cAhN47pbsyloz3N X-Received: by 2002:a05:6820:e83:b0:58c:ec4c:fcac with SMTP id em3-20020a0568200e8300b0058cec4cfcacmr101160oob.0.1700755803128; Thu, 23 Nov 2023 08:10:03 -0800 (PST) X-Received: by 2002:a05:6820:e83:b0:58c:ec4c:fcac with SMTP id em3-20020a0568200e8300b0058cec4cfcacmr101137oob.0.1700755802907; Thu, 23 Nov 2023 08:10:02 -0800 (PST) Received: from x1n (cpe688f2e2cb7c3-cm688f2e2cb7c0.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id a24-20020a0ca998000000b00677a12f11bcsm625712qvb.24.2023.11.23.08.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 08:10:02 -0800 (PST) Date: Thu, 23 Nov 2023 11:10:00 -0500 From: Peter Xu To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrea Arcangeli , James Houghton , Lorenzo Stoakes , David Hildenbrand , Vlastimil Babka , John Hubbard , Yang Shi , Rik van Riel , Hugh Dickins , Matthew Wilcox , Jason Gunthorpe , Axel Rasmussen , "Kirill A . Shutemov" , Andrew Morton , linuxppc-dev@lists.ozlabs.org, Mike Rapoport , Mike Kravetz Subject: Re: [PATCH RFC 06/12] mm/gup: Drop folio_fast_pin_allowed() in hugepd processing Message-ID: References: <20231116012908.392077-1-peterx@redhat.com> <20231116012908.392077-7-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 23 Nov 2023 08:10:21 -0800 (PST) On Wed, Nov 22, 2023 at 11:21:50PM -0800, Christoph Hellwig wrote: > That alone sounds like a good reason to not bother. So unless more > qualified people have a different opinion I'm fine with this patch > as long as you leave a comment in place, and ammend the commit message > with some of the very useful information from your mail. Will do, thanks. This is what I will squash into the same patch in the new version, as the current plan: +/* + * NOTE: currently hugepd is only used in hugetlbfs file systems on Power, + * which does not have issue with folio writeback against GUP updates. + * When hugepd will be extended to support non-hugetlbfs or even anonymous + * memory, we need to do extra check as what we do with most of the other + * folios. See writable_file_mapping_allowed() and folio_fast_pin_allowed() + * for more information. + */ static int gup_huge_pd(hugepd_t hugepd, unsigned long addr, unsigned int pdshift, unsigned long end, unsigned int flags, struct page **pages, int *nr) -- Peter Xu