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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EABD8C433F5 for ; Fri, 25 Feb 2022 13:12:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241025AbiBYNNQ (ORCPT ); Fri, 25 Feb 2022 08:13:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241007AbiBYNNO (ORCPT ); Fri, 25 Feb 2022 08:13:14 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7D1DB181E45 for ; Fri, 25 Feb 2022 05:12:42 -0800 (PST) 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-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-147-n2hgkKUaNX-SzJhm0V7p5Q-1; Fri, 25 Feb 2022 08:12:40 -0500 X-MC-Unique: n2hgkKUaNX-SzJhm0V7p5Q-1 Received: by mail-wm1-f71.google.com with SMTP id ay7-20020a05600c1e0700b003813d7a7d03so489763wmb.1 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=34re4qWf4qVypql/EXiA0Ao2p1REWMO3zwLC5vnOvI/3iya8x79/wvYNetS0lraQJJ d06VnYyUrHapWGICDOwAiHaykCnUPFF84mfMm3gxVp1SaY4WWO7WC65l0hQzLukl6eTm 8lszDVlNWlnI04YgwmxFoDvcTSWY/wxEDG5MwVTUQ9sZcxsPhCO9AwmOWQeBn0r9SdAX R3o6qMhz05dbZEWm061KYYdKifp/gLYiTJSqEUqV8U6S1RDcDPRPcq7wRgOD8Y6K2jxZ axxV9vxUhwXLDZOukzZ11S0fvQimuMSMvaB5Kv6csd863FmvJ7HzP4XC1uSGg970pBjF pXmw== X-Gm-Message-State: AOAM532AOuoqMbgPoflQlsQY1/u3aG5RKKksTAzt62Zn9Om3JWCD9QsK Za9t+W5VQILAYh7wF6gqpQzAtysGFJy1kFMHgEuzYHJf255mr+cMdlpv1bYdsmpHOgdcBj/ZsxO Znidacfhr34ANpQiLcr7gHDQP X-Received: by 2002:a05:600c:230d:b0:37d:5882:ec9b with SMTP id 13-20020a05600c230d00b0037d5882ec9bmr2621759wmo.162.1645794759006; 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 Content-Language: en-US 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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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