Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp805607rwr; Wed, 19 Apr 2023 13:24:28 -0700 (PDT) X-Google-Smtp-Source: AKy350ZxogQEgk6r0h5xyIs+5c6JEqiuhQKCtBFHtZ+FGj6j3TZ1Nz11iDtD3hnuXcCmINq4zst9 X-Received: by 2002:a17:902:ce8e:b0:1a2:86c6:7b66 with SMTP id f14-20020a170902ce8e00b001a286c67b66mr8829635plg.4.1681935868313; Wed, 19 Apr 2023 13:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681935868; cv=none; d=google.com; s=arc-20160816; b=cqq+rsCy0ivkRGTyL+D2vwD/fXTajDSkuVtWgtWchkaJ4aev0HCRl5Wa/GnhioY3OJ VJH6+0BiEY29sDa9EJl63Z5Y8gIwX4NaMf9wjxQ+/w6jEs6LQZ6rb1vdeLkf52oMeoMu 5PdpCVfOUre54Il1tSSIScKGEITgiRh8+oVGTPSJnsmTnNrdFhfJVn7QL6Ku1vbWx3HT DzZ9ZtUa5Ww17AYX1Bn0U6W+thnl2LyEieHyGWsMczd69Jf5hmLtuK5bGnuC/XlDSW77 AAG1ccEj7wNwQmlJ/AAhI7hwWcLu/G3M8aILu6Ea8+LmORANM17BqEldYwF21pTe2+BX 9IVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=bvZWJ1N6yNvRBqGXQz8TnJs0OJnTiWfSHlO4iBrhO8M=; b=ST9TcgU5Ssx4eDOk7HtWs2CtAMB7bUJFOWTCOo1M6xXkUxwcFSO46g+L9s8M02k7qu iJKGLf4rbXHDMPEcjZxbCbOKTVsVSAWsNXQNGnCXnxwwDOq1er3RbWDB9M6NqXxqRHFI hawP2kLxfag8mZPaOP2nM7RVOaoapT0Nx1SsN9z/c52brks5mXkYt3cPxy3gjSoUKXNY Ji2QUQfIT9b0TybQSeJiK64qtJbqgJ6J3/u23FvquFb+2ka19NaHRmMSV/0Zs9YZ7kwj usHRXMDiDaAPxqqJwnVnULXbcVy6ho3pZDGZP0owcHDiZkOT3u04ETya6MVTlp1ZCdnG zJKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b=BEliT26i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14-20020a170902f54e00b001a1f6671a6dsi8818591plf.397.2023.04.19.13.24.15; Wed, 19 Apr 2023 13:24:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b=BEliT26i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbjDSUSg (ORCPT + 99 others); Wed, 19 Apr 2023 16:18:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231658AbjDSUSf (ORCPT ); Wed, 19 Apr 2023 16:18:35 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6C215FD2 for ; Wed, 19 Apr 2023 13:18:33 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5144427bad7so18845a12.0 for ; Wed, 19 Apr 2023 13:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20221208.gappssmtp.com; s=20221208; t=1681935513; x=1684527513; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=bvZWJ1N6yNvRBqGXQz8TnJs0OJnTiWfSHlO4iBrhO8M=; b=BEliT26iov9LcAPuQgrau9zf1VtcgOoB1JsGu12bU6DGQ5+WFUv0KRukD0OpYmnVvW bJyaxfMfmViOdXx6wc3UJ7Tl7saJ4tzfR1KyR4lYZ+9nPSd3hydd1hBHSBjYFxdeeRnK U7ergnMoNOJvl+jcQf7j+hjaBJl510TU9dJX5QRDHxWicyKaPh8GqibO+HASM8u9nVUL vhXzZuhS4YquTc8x60ayp+d9VYF+SOyXnKdT4L23S0GMTgRF1t+D/tjfn53RGfvc65Il zCi/YGVSPNgqzLUTY6ANxDqAyg0p6WilaYat+wOZ+PgSODlmvhjdPSZu+BvjWoZBHrE7 K+dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681935513; x=1684527513; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bvZWJ1N6yNvRBqGXQz8TnJs0OJnTiWfSHlO4iBrhO8M=; b=l59l5I0Szj/1Z1SKGjabIHlwf47QQ1mO2h0LWRmpWySrb8R2jHDgjwwAN4MIYPqkeY qtTjDlF8bw4fKOmpk744uaK90+ZdkD/Mvrge8Za+EgG2uyrO9Z4KcAZ5+Uqd16n5Bqw7 MFi5YJ3X7UB+z+GuLJkDagoKAKubC3QFPpzxeY0FJlnAR/64YgzIUeNs3iRYQHo0UGTf S3elTP0hhFnZnhhR1D1j719rJ8XCmYrpkUAsu61M4ZqVfWicgYi9OYFXBChgOipg4CsZ ZEwTKdqEeMi0iYbHHHmkADJBD9IA+TtA5CSSngaGYd9lGDYrDSAdMgcIiuKgbeL8DGrm xBBA== X-Gm-Message-State: AAQBX9cPb8nqvdKFTqAXD2f6s4HS9z/OGxN/VilaO0qzebOQ7IRm+dS5 /UTnOxMjfwmxvl2f5H0GreB+Ug== X-Received: by 2002:a17:903:2308:b0:19a:a815:2877 with SMTP id d8-20020a170903230800b0019aa8152877mr23336646plh.6.1681935513184; Wed, 19 Apr 2023 13:18:33 -0700 (PDT) Received: from [192.168.1.136] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id iz17-20020a170902ef9100b001a19f2f81a3sm11825243plb.175.2023.04.19.13.18.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Apr 2023 13:18:32 -0700 (PDT) Message-ID: Date: Wed, 19 Apr 2023 14:18:31 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v4 4/6] io_uring: rsrc: avoid use of vmas parameter in pin_user_pages() Content-Language: en-US From: Jens Axboe To: Jason Gunthorpe , Matthew Wilcox Cc: Lorenzo Stoakes , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , David Hildenbrand , Pavel Begunkov , io-uring@vger.kernel.org References: <956f4fc2204f23e4c00e9602ded80cb4e7b5df9b.1681831798.git.lstoakes@gmail.com> <936e8f52-00be-6721-cb3e-42338f2ecc2f@kernel.dk> <69f48cc6-8fc6-0c49-5a79-6c7d248e4ad5@kernel.dk> <8af483d2-0d3d-5ece-fb1d-a3654411752b@kernel.dk> <567b593e-2ad0-9bec-4e6f-4bbb3301524c@kernel.dk> In-Reply-To: <567b593e-2ad0-9bec-4e6f-4bbb3301524c@kernel.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/19/23 2:15 PM, Jens Axboe wrote: > On 4/19/23 12:24?PM, Jason Gunthorpe wrote: >> On Wed, Apr 19, 2023 at 07:23:00PM +0100, Matthew Wilcox wrote: >>> On Wed, Apr 19, 2023 at 07:18:26PM +0100, Lorenzo Stoakes wrote: >>>> So even if I did the FOLL_ALLOW_BROKEN_FILE_MAPPING patch series first, I >>>> would still need to come along and delete a bunch of your code >>>> afterwards. And unfortunately Pavel's recent change which insists on not >>>> having different vm_file's across VMAs for the buffer would have to be >>>> reverted so I expect it might not be entirely without discussion. >>> >>> I don't even understand why Pavel wanted to make this change. The >>> commit log really doesn't say. >>> >>> commit edd478269640 >>> Author: Pavel Begunkov >>> Date: Wed Feb 22 14:36:48 2023 +0000 >>> >>> io_uring/rsrc: disallow multi-source reg buffers >>> >>> If two or more mappings go back to back to each other they can be passed >>> into io_uring to be registered as a single registered buffer. That would >>> even work if mappings came from different sources, e.g. it's possible to >>> mix in this way anon pages and pages from shmem or hugetlb. That is not >>> a problem but it'd rather be less prone if we forbid such mixing. >>> >>> Cc: >>> Signed-off-by: Pavel Begunkov >>> Signed-off-by: Jens Axboe >>> >>> It even says "That is not a problem"! So why was this patch merged >>> if it's not fixing a problem? >>> >>> It's now standing in the way of an actual cleanup. So why don't we >>> revert it? There must be more to it than this ... >> >> https://lore.kernel.org/all/61ded378-51a8-1dcb-b631-fda1903248a9@gmail.com/ > > Let's just kill that patch that, I can add a revert for 6.4. I had > forgotten about that patch and guess I didn't realize that most of the > issue do in fact just stem from that. https://git.kernel.dk/cgit/linux-block/commit/?h=for-6.4/io_uring&id=fbd3aaf37886d3645b1bd6920f6298f5884049f8 -- Jens Axboe