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 D3891C433F5 for ; Fri, 25 Feb 2022 13:12:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 376978D0002; Fri, 25 Feb 2022 08:12:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 325218D0001; Fri, 25 Feb 2022 08:12:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1ECF18D0002; Fri, 25 Feb 2022 08:12:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 0E6458D0001 for ; Fri, 25 Feb 2022 08:12:43 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id C4DAA22F6B for ; Fri, 25 Feb 2022 13:12:42 +0000 (UTC) X-FDA: 79181341764.07.CAEC748 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf17.hostedemail.com (Postfix) with ESMTP id 21BC04000B for ; Fri, 25 Feb 2022 13:12:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645794761; 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=Q5m/jO7lh5udnKQzVaUijMT/vcP8DIr3AnFBCv6X8sA=; b=A+whudTHBepKndncnELDJctBP6oue4vB3ufQvbGVHmaOmN0NNDVYUiY70U9rMqGdsgRxP3 Ehk1454R3uy3G6MRabXy6klxw8OQP0fYbFDUlY1TnHXriHha4Kgyu9/jPlNfaeTupNCJuS PreZpfbiNMAyA3fZUXDuGSyiffPuIO0= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-327--eCGqxOFM8q-aqSFqbivtQ-1; Fri, 25 Feb 2022 08:12:40 -0500 X-MC-Unique: -eCGqxOFM8q-aqSFqbivtQ-1 Received: by mail-wr1-f71.google.com with SMTP id g15-20020adfbc8f000000b001e9506e27ddso871327wrh.22 for ; Fri, 25 Feb 2022 05:12:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=Q5m/jO7lh5udnKQzVaUijMT/vcP8DIr3AnFBCv6X8sA=; b=EjJMUnTDED4RwDcDuqhhjR3pDY7Tv7Sr753hKfsM0qPzKn+OIZ7hAIIVfcx8OL4OWi ylCv7ON4zZomB/IEtTBpYjaecS7jDkPok/rx97XF/7jVj0y+SgTuBpZJDUogKvWdmOZS uzTDPK0KYTF2vBBngZiAKaSNrNlrMfMqO3fecSRvJ4KfCtXFjn9D7W33J4hlZUQiBeMu 8p7REur+e35XsI433zprVkjuWW2HXGGJ0gT45l9jdPL7yd/jgI+1F+L1puAtllGYcEf8 h1o+Yk1Eg1TxTm4YqQp+PnV23FOaQuE3OouPmJijaJS7XkL1owZjQOlVIWux6lnj4SY6 Ussw== X-Gm-Message-State: AOAM533Pic1E3xJx2LEj3kVpZenH1xJ8sIcgPUaKGIK56KjqMAcaOThJ UUMRQFRBjPzuCFZs8LRCPK2Nv8BwpzXYOf/Wq5wVdHIspihG41xuKym6urXV2Sy77jmtB9Vsa5z FdedMnSzNsho= X-Received: by 2002:a05:600c:230d:b0:37d:5882:ec9b with SMTP id 13-20020a05600c230d00b0037d5882ec9bmr2621764wmo.162.1645794759007; Fri, 25 Feb 2022 05:12:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwI4b9vBHcOeQt/ZmS1/e52HNSF01bwScuFUG5ZV9CohndqVjI+TJ4cckBrt1RE2I3tNlK5oQ== X-Received: by 2002:a05:600c:230d:b0:37d:5882:ec9b with SMTP id 13-20020a05600c230d00b0037d5882ec9bmr2621744wmo.162.1645794758739; Fri, 25 Feb 2022 05:12:38 -0800 (PST) Received: from ?IPV6:2003:cb:c706:1900:f2f7:d2ad:80d9:218f? (p200300cbc7061900f2f7d2ad80d9218f.dip0.t-ipconnect.de. [2003:cb:c706:1900:f2f7:d2ad:80d9:218f]) by smtp.gmail.com with ESMTPSA id m5-20020a05600c3b0500b00380da3ac789sm2535021wms.1.2022.02.25.05.12.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Feb 2022 05:12:38 -0800 (PST) Message-ID: Date: Fri, 25 Feb 2022 14:12:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [RFC PATCH 0/7] block, fs: convert Direct IO to FOLL_PIN To: John Hubbard , Jens Axboe , Jan Kara , Christoph Hellwig , Dave Chinner , "Darrick J . Wong" , Theodore Ts'o , Alexander Viro , Miklos Szeredi , Andrew Morton , Chaitanya Kulkarni Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, LKML References: <20220225085025.3052894-1-jhubbard@nvidia.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220225085025.3052894-1-jhubbard@nvidia.com> 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 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 21BC04000B X-Stat-Signature: djiy7nf6er6k68h8uuoe41m3bkupjdnd Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=A+whudTH; spf=none (imf17.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1645794761-303281 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 25.02.22 09:50, John Hubbard wrote: > Hi, > > Summary: > > This puts some prerequisites in place, including a CONFIG parameter, > making it possible to start converting and testing the Direct IO part of > each filesystem, from get_user_pages_fast(), to pin_user_pages_fast(). > > It will take "a few" kernel releases to get the whole thing done. > > Details: > > As part of fixing the "get_user_pages() + file-backed memory" problem > [1], and to support various COW-related fixes as well [2], we need to > convert the Direct IO code from get_user_pages_fast(), to > pin_user_pages_fast(). Because pin_user_pages*() calls require a > corresponding call to unpin_user_page(), the conversion is more > elaborate than just substitution. > > Further complicating the conversion, the block/bio layers get their > Direct IO pages via iov_iter_get_pages() and iov_iter_get_pages_alloc(), > each of which has a large number of callers. All of those callers need > to be audited and changed so that they call unpin_user_page(), rather > than put_page(). vmsplice is another candidate that uses iov_iter_get_pages() and should be converted to FOLL_PIN. For that particular user, we have to also pass FOLL_LONGTERM -- vmsplice as it stands can block memory hotunplug / CMA / ... for all eternity. -- Thanks, David / dhildenb