From patchwork Tue Jun 13 21:53:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13279236 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 E2DE2EB64D7 for ; Tue, 13 Jun 2023 21:54:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7BA746B007E; Tue, 13 Jun 2023 17:54:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 769FC6B0080; Tue, 13 Jun 2023 17:54:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 632648E0002; Tue, 13 Jun 2023 17:54:07 -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 564606B007E for ; Tue, 13 Jun 2023 17:54:07 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 20DF0C061B for ; Tue, 13 Jun 2023 21:54:07 +0000 (UTC) X-FDA: 80899078134.24.C950D1A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 151B42000C for ; Tue, 13 Jun 2023 21:54:04 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=IPNrbSgJ; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686693245; 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=nVhPI7Qoz7ZqnzsG9+Pwmnk6AKrA3Y9yvdpVEt0mHXM=; b=nbEf/hR9RhCMCT4lkHJ71F8zF6xjW4JvVH98DFQ3r9+H/BDGNlAVntXZr2r/FgXU6S56OI Lbfvo/ZDWyymiZlWKBsIhCP8IsWdmUCKxsittCAiF9F//Pggex4Y6cTTxeXiQcotDKyeO8 SMaNGn+bWemSb9XjGtSCo9QPTIZ2k2s= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=IPNrbSgJ; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf03.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686693245; a=rsa-sha256; cv=none; b=0NCwa2w+Asq8AzptyMfP8LVXh2q+gvrKpVMbWMF32xe17NhI8mo7pg1Oh8TXPLvYivnBgm 5V1LeTxegQmL1Oz815jyZ0JbBGgB540eWXlC8cn0/BROepkm0H0vxwL4h+aZU07dfZanGM FDqMCC1tKkly2LqBQa+yL6BkvHJLSQ4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686693244; 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=nVhPI7Qoz7ZqnzsG9+Pwmnk6AKrA3Y9yvdpVEt0mHXM=; b=IPNrbSgJa9QT+ExJtse1wMncXd5Yr/yfgJiM5xoXpNMPkwfqCH9CO3DIcfXZCTq0ZQ+2WU RxbgR5yKNf9gsQJHnowZIeuLSZGY7Y2+jTU6RvwiIKmduHzCuBJt6KIZOkowV4ib7zNRsx dQXmiH4JCGhzZ/voU22g+GI60i/1nEs= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-557-JUWMdCrcOE6fy-Q3CGZuRQ-1; Tue, 13 Jun 2023 17:54:00 -0400 X-MC-Unique: JUWMdCrcOE6fy-Q3CGZuRQ-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-3fb2e6ca6eeso2354281cf.1 for ; Tue, 13 Jun 2023 14:54:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686693240; x=1689285240; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nVhPI7Qoz7ZqnzsG9+Pwmnk6AKrA3Y9yvdpVEt0mHXM=; b=W3YSkrdZcRr5b4Uk3kT4uUXbfj/MtBzEpaef1qujQUEk2erBWm3LhhB1/KSthjE3/M CPWD0+FQyZbguhrPrNR8lBQ2JQrypmsFCzqwGIFqTLrYcdQoCEglb4y5L0nRvoRBUDlr KEC6XjYRaADkU4pCto+mrppxZmcybl5u1WxNb/DANpzboJoKC8Awt5I/XukFyKpYwCB+ VUnltHpU6W2P4+1CGWP0Ol5JLy5/bd7KrgSVthMcyUCirO6OnCgHp2NW+l6uYp8AktNy TpF5CSmsabLFwGyPQAc6a1ovx5pYyBdbpqj9zF3qCBbQoSAMx/UzJY0xVrJAa4++w52F nGSA== X-Gm-Message-State: AC+VfDzz8nCDMkdeCzNVTgZOHxZMAklPpEOZX0ylDuKDzsjPuaGjqYC8 JQ2NndaS6mhYTPy3AZTGh1U2pQSUsodoPCvsPSy2JBIKmyjL/f7Qp1o6w13oGC5sm216GMlNHgi 55Z1nQ4v0ErE= X-Received: by 2002:a05:622a:288:b0:3ef:3dc3:4a3e with SMTP id z8-20020a05622a028800b003ef3dc34a3emr17942030qtw.0.1686693239732; Tue, 13 Jun 2023 14:53:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4MJSKcPdnj4lChUYnJRMcBfBWV2PeylliGTEYFlrviAqe21ltK55iRSzWqqMvZUCA8so0tsg== X-Received: by 2002:a05:622a:288:b0:3ef:3dc3:4a3e with SMTP id z8-20020a05622a028800b003ef3dc34a3emr17942021qtw.0.1686693239513; Tue, 13 Jun 2023 14:53:59 -0700 (PDT) Received: from x1n.redhat.com (cpe5c7695f3aee0-cm5c7695f3aede.cpe.net.cable.rogers.com. [99.254.144.39]) by smtp.gmail.com with ESMTPSA id fz24-20020a05622a5a9800b003f9bccc3182sm4522330qtb.32.2023.06.13.14.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 14:53:58 -0700 (PDT) From: Peter Xu To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Matthew Wilcox , Andrea Arcangeli , John Hubbard , Mike Rapoport , David Hildenbrand , Vlastimil Babka , peterx@redhat.com, "Kirill A . Shutemov" , Andrew Morton , Mike Kravetz , James Houghton , Hugh Dickins Subject: [PATCH 4/7] mm/hugetlb: Prepare hugetlb_follow_page_mask() for FOLL_PIN Date: Tue, 13 Jun 2023 17:53:43 -0400 Message-Id: <20230613215346.1022773-5-peterx@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230613215346.1022773-1-peterx@redhat.com> References: <20230613215346.1022773-1-peterx@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Rspam-User: X-Stat-Signature: n433wzqjcfd31ikhh59i39wz19gfuyzw X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 151B42000C X-HE-Tag: 1686693244-861430 X-HE-Meta: U2FsdGVkX1+BtBlPXLqp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qKy140YhrTJvgC25jwiN9gyTQTATNicp5DT+QSAndpuIzFBCJVnrxKTCYj0jHdBBXvL05kBVspZayc6XBw575lg68EIW5b6gcnMZeJWjcw5ochWk608EffBVoJe2ma1H/e1uSjwVQiC159hXI8aX4/4zME2/x1bwwDh34wIgpOIH/AKB9dW9jp6k1oHvmFLn56xRY1CwSgp6JyjP+BKiP1bBfvlLAQEu+S87DjXAsvFw5k7rldLAy9sWe3qbUd3EHXS83iqIIohYJqXW7kanlUqoPFk+fKCZemFLhiSauxeNfVeHD/slvYHV40L2ZrXgAWs6cTdFqtQDA== 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: It's coming, not yet, but soon. Loose the restriction. Signed-off-by: Peter Xu --- mm/hugetlb.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index f037eaf9d819..31d8f18bc2e4 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -6467,13 +6467,6 @@ struct page *hugetlb_follow_page_mask(struct vm_area_struct *vma, spinlock_t *ptl; pte_t *pte, entry; - /* - * FOLL_PIN is not supported for follow_page(). Ordinary GUP goes via - * follow_hugetlb_page(). - */ - if (WARN_ON_ONCE(flags & FOLL_PIN)) - return NULL; - hugetlb_vma_lock_read(vma); pte = hugetlb_walk(vma, haddr, huge_page_size(h)); if (!pte)