From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from outbound-ip191b.ess.barracuda.com (outbound-ip191b.ess.barracuda.com [209.222.82.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 607E02AD02; Tue, 3 Dec 2024 13:49:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=209.222.82.124 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733233767; cv=fail; b=JgnMXAE3SaSymIqByuCrQgZOg9ffSdj8tuVCqF66peSbJi1DH+yJQv5IpYs/HLabVL66wN8K0P02MgA1ZiJ4OJ/iyA9u268EiTBPzH2dLTn7rSEiB+qLnbWvKvB3Psk5vO4TwixgWymlMeLXsg4iHxy2klvYh4VRkRpiDvrQKe8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733233767; c=relaxed/simple; bh=6s6LeMxc1PryUHhLbOvGDVvPAV6BN6T9r0bHl4XJF1Q=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=YqX+DRPeDiWcL3J97nuGOmHShBQeSNTKqx9ID6sgck7CfoduaJsbr+sMwp9mqxyspVZcxNtq2Lu7ScZ7+EPRzQJBKB8SH7ZOeV6+0tQ2CQhn9aFSel8nYulicwmYQu5inu2eqZpDKaualTQWZr+UvI0oxmMfhWCGtebIZrNoZMw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ddn.com; spf=pass smtp.mailfrom=ddn.com; dkim=pass (1024-bit key) header.d=ddn.com header.i=@ddn.com header.b=la68cZw1; arc=fail smtp.client-ip=209.222.82.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ddn.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ddn.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ddn.com header.i=@ddn.com header.b="la68cZw1" Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2043.outbound.protection.outlook.com [104.47.66.43]) by mx-outbound19-148.us-east-2b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 03 Dec 2024 13:49:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GbyF32izvtM90hINCY+0ieSvhOhhpFqmtZUPlm80sVWTU14afWtq+edvMvwjd6MaLSwdMWtz92WoMHXS5JA+qDGxD8SeCM+rTg6fixCu/cO/0r/90ETKp03HtqGzCw+ay2z5mJxN18YE4Jbq7tWswqmgi2zgG7JQiBVMzOGWlpqr6ByrtQg3Y5Uf0X3wnc1PnOJxJJIoRaCYP+dn1XOIIX/EdjTBDdMR56h0PZ8Cf62XO4ipVt2uexQk6QvpHFE3bGdAuKL7ftvrIZ/l1aUbAKz1DyhKe4IAZz1pButKWJSx7CmM74Bzfv8rmqt/KFhWbXFElQqUfrySZ+wUK4h3ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Q2AkRUWKIg5rXdd3IebLCBqg9Twsdd5V1qwQz9Y1Y0k=; b=zEDAj3K+3vonJnJIllFov5YWXMu13UYcrJLlqyx6sFz3qAR9rlHmaahF/8ORhUUfrBQCi1OYcllpd++lUQxoXFPwaosNcWhfmLzQZYGGWd9Az2gZgEoPk7rKsvvFCdcQnhlxxdME1dmaEidEZhnjth+K4N25ySgUSAVuGGH1AY3f3UWHL1RFJtnMLCwEtN7Yd9Oymlo+ZrAhA7fsFGTTEfegIrZQUC2LAJQZSHwomHaNs8BJLlixcZa4Xs3hlLwvqDVJRyedwICqkrdEsgC2/HvgWXm7OY42t5WcXYThw0GDbuWMluiOnOjZigszr2xAXBcN1jobBmsWMSt8S+l2xg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ddn.com; dmarc=pass action=none header.from=ddn.com; dkim=pass header.d=ddn.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddn.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q2AkRUWKIg5rXdd3IebLCBqg9Twsdd5V1qwQz9Y1Y0k=; b=la68cZw1YjQnHgNZTqU8AVfdbXeOb/+XSaJLYYCchaUbF7e64onXpQh9OvE/0UXSWIvGr3VdHtEbrYlmtcpkSqK5oQ6XqPA//5OlstTs/bJk1WiIrd84Pf3j9hHQCa2HZZfnaasC5w+f/8R1XvSL49VR2T7tP1MdOtWDlzmcIcw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ddn.com; Received: from CH2PR19MB3864.namprd19.prod.outlook.com (2603:10b6:610:93::21) by LV2PR19MB5815.namprd19.prod.outlook.com (2603:10b6:408:174::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Tue, 3 Dec 2024 13:49:12 +0000 Received: from CH2PR19MB3864.namprd19.prod.outlook.com ([fe80::abe1:8b29:6aaa:8f03]) by CH2PR19MB3864.namprd19.prod.outlook.com ([fe80::abe1:8b29:6aaa:8f03%3]) with mapi id 15.20.8207.017; Tue, 3 Dec 2024 13:49:12 +0000 Message-ID: <07e4b270-f6f5-471a-b2b7-4fb5027fdb20@ddn.com> Date: Tue, 3 Dec 2024 14:49:07 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC v7 06/16] fuse: {uring} Handle SQEs - register commands To: Pavel Begunkov , Miklos Szeredi Cc: Jens Axboe , linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org, Joanne Koong , Josef Bacik , Amir Goldstein , Ming Lei , David Wei , bernd@bsbernd.com References: <20241127-fuse-uring-for-6-10-rfc4-v7-0-934b3a69baca@ddn.com> <20241127-fuse-uring-for-6-10-rfc4-v7-6-934b3a69baca@ddn.com> <42d5cd02-a1b9-4cd9-ae92-99bdcac65305@gmail.com> From: Bernd Schubert Content-Language: en-US, de-DE, fr In-Reply-To: <42d5cd02-a1b9-4cd9-ae92-99bdcac65305@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PA7P264CA0008.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:2d3::14) To CH2PR19MB3864.namprd19.prod.outlook.com (2603:10b6:610:93::21) Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR19MB3864:EE_|LV2PR19MB5815:EE_ X-MS-Office365-Filtering-Correlation-Id: ad073249-2f10-44e9-cfc1-08dd13a14487 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|10070799003|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?a1Fqbm13MCt0bXBhVC9xVTBWak11SHNycXVWODdtVEZGdWpCdXdaa0psMFN4?= =?utf-8?B?d0NaZXplWDhvS1dwZGxYeFRyTTRHZythZmxlRUFTaGRicnlucXFaTmtpU204?= =?utf-8?B?bTZuc3dxcTh4V3VFampHRmtJeUhlc1NVWU9IMjlRSDdqcWxaMkNqRmgrUE44?= =?utf-8?B?Zk16TzdJVnJQdkszZC91eStxU0NkTkg4UzhFL3I2QzF0dWE1dWUvRFJyT1Bh?= =?utf-8?B?RUFjWlBibnA3Mndra1p1a0tORDdsLzI0TlpTb21I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wSXo3dnlHdjczcmpoQWFqZ1lTS3FN?= =?utf-8?B?eFBXS1h0enBJeVhTcDdGTEtndGtELzFWQVpINzB6VmpTV09oSGErb2JDL0pX?= =?utf-8?B?UVRUVUpVVEdBMkVla0NBT3ZaM3VNejN3MER3SVlyU3ZFQ0pDS1Bmdm9paDdi?= =?utf-8?B?ZFBjWUM4RHp5QnJoS09xMUwvck1vVVNzR0t6c1VMb0ZZZy80bEIwOGNoUk1Q?= =?utf-8?B?MVJGbTdNUVJGR0N4ZXZkYThKWm5TMHV3MWJsSndCT2xpS0lLY2pEWmlQdVRK?= =?utf-8?B?YlBzdVFVRVRRWkxEcy9pUmdHQjJvdmRVVXlVYVhjWEZKY0QrY3NadkdHS0Fz?= =?utf-8?B?NFZPWlNrNzBnWkF1TnJGaGppaEdTM0N1K2VDU3gxS3VkM3ZNbWxFdmNxaExT?= =?utf-8?B?R2ZyMW9FMmRTeExpeDEyWXZVbFVMTjhYTW1kbEhWc3M0QkYwdDgvYlBWaHZx?= =?utf-8?B?TDR5Wkk3K1kzUXQ3Y2FXNGpPQW9wa0ptelFESVlZNWZvMExJSHovUzl0WjNB?= =?utf-8?B?Zmk3elRGa1JSUlE0ZXB4bjFOa01NSFpobFphaDMrWWlGZmp6T2FabWJudGxj?= =?utf-8?B?QTR4Z3NSUkswOGlFNzRKb3hRTnoyenNuaTUwNHIyNlo1Qm9rZXBySEgvTnJN?= =?utf-8?B?UnFFVlZWaWJyZWY0RjRlQT09?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH2PR19MB3864.namprd19.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(10070799003)(1800799024)(366016);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?S3JZNVlmUGNvUkZza1lTQVlyNy8zTlZuVVByRVljVjFyT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/EQm4oNR+k756pQV/+5jxDGr7bx5Qyy8yaEh8O7Wzs/ob8nT8rxQFCrfjiL3SuzJFSLf1qjuozXkYVsZ+mK/g3+9vbAttVybHlQiH6W3D/5qRf/Bucm3yiXm9AnxVzSWflQ5ukHbvlcVQ== X-OriginatorOrg: ddn.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad073249-2f10-44e9-cfc1-08dd13a14487 X-MS-Exchange-CrossTenant-AuthSource: CH2PR19MB3864.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2024 13:49:11.9393 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 753b6e26-6fd3-43e6-8248-3f1735d59bb4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FBptjKN5+rIY+oUZng78Ln8MRja6zHGpBmKo1Uq14ttaR/3eUIiPRdAPmAGf4YrB7QNPNoE5WQGrT+EU1E4ygw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR19MB5815 X-BESS-ID: 1733233757-105012-13348-6689-1 X-BESS-VER: 2019.1_20241126.2220 X-BESS-Apparent-Source-IP: 104.47.66.43 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVqYWliZAVgZQ0CjR1CI5Nck4zc LcMtXMyNDUMDXF2DDROMnEIDnVODlFqTYWAFvlw3hBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.260857 [from cloudscan17-65.us-east-2b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS124931 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status:1 On 12/3/24 14:24, Pavel Begunkov wrote: > On 11/27/24 13:40, Bernd Schubert wrote: >> This adds basic support for ring SQEs (with opcode=IORING_OP_URING_CMD). >> For now only FUSE_URING_REQ_FETCH is handled to register queue entries. >> >> Signed-off-by: Bernd Schubert >> --- >>   fs/fuse/Kconfig           |  12 ++ >>   fs/fuse/Makefile          |   1 + >>   fs/fuse/dev.c             |   4 + >>   fs/fuse/dev_uring.c       | 318 ++++++++++++++++++++++++++++++++++++ >> ++++++++++ >>   fs/fuse/dev_uring_i.h     | 115 +++++++++++++++++ >>   fs/fuse/fuse_i.h          |   5 + >>   fs/fuse/inode.c           |  10 ++ >>   include/uapi/linux/fuse.h |  67 ++++++++++ >>   8 files changed, 532 insertions(+) >> > >  diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c >> new file mode 100644 >> index >> 0000000000000000000000000000000000000000..af9c5f116ba1dcf6c01d0359d1a06491c92c32f9 >> --- /dev/null >> +++ b/fs/fuse/dev_uring.c > ... >> + >> +/* >> + * fuse_uring_req_fetch command handling >> + */ >> +static void _fuse_uring_fetch(struct fuse_ring_ent *ring_ent, >> +                  struct io_uring_cmd *cmd, >> +                  unsigned int issue_flags) >> +{ >> +    struct fuse_ring_queue *queue = ring_ent->queue; >> + >> +    spin_lock(&queue->lock); >> +    fuse_uring_ent_avail(ring_ent, queue); >> +    ring_ent->cmd = cmd; >> +    spin_unlock(&queue->lock); >> +} >> + >> +/* >> + * sqe->addr is a ptr to an iovec array, iov[0] has the headers, iov[1] >> + * the payload >> + */ >> +static int fuse_uring_get_iovec_from_sqe(const struct io_uring_sqe *sqe, >> +                     struct iovec iov[FUSE_URING_IOV_SEGS]) >> +{ >> +    struct iovec __user *uiov = u64_to_user_ptr(READ_ONCE(sqe->addr)); >> +    struct iov_iter iter; >> +    ssize_t ret; >> + >> +    if (sqe->len != FUSE_URING_IOV_SEGS) >> +        return -EINVAL; >> + >> +    /* >> +     * Direction for buffer access will actually be READ and WRITE, >> +     * using write for the import should include READ access as well. >> +     */ >> +    ret = import_iovec(WRITE, uiov, FUSE_URING_IOV_SEGS, >> +               FUSE_URING_IOV_SEGS, &iov, &iter); > > You're throwing away the iterator, I'd be a bit cautious about it. > FUSE_URING_IOV_SEGS is 2, so it should avoid ITER_UBUF, but Jens > can say if it's abuse of the API or not. > > Fwiw, it's not the first place I know of that just want to get > an iovec avoiding playing games with different iterator modes. Shall I create new exported function like import_iovec_from_user() that duplicates all the parts from __import_iovec()? I could also let __import_iovec() use that new function, although there will be less inlining with -02. > > >> +    if (ret < 0) >> +        return ret; >> + >> +    return 0; >> +} >> + >> +static int fuse_uring_fetch(struct io_uring_cmd *cmd, unsigned int >> issue_flags, >> +                struct fuse_conn *fc) >> +{ >> +    const struct fuse_uring_cmd_req *cmd_req = io_uring_sqe_cmd(cmd- >> >sqe); > > You need to check that the ring is setup with SQE128. > > (!(issue_flags & IO_URING_F_SQE128)) >     // fail > >> +    struct fuse_ring *ring = fc->ring; >> +    struct fuse_ring_queue *queue; >> +    struct fuse_ring_ent *ring_ent; >> +    int err; >> +    struct iovec iov[FUSE_URING_IOV_SEGS]; >> + >> +    err = fuse_uring_get_iovec_from_sqe(cmd->sqe, iov); >> +    if (err) { >> +        pr_info_ratelimited("Failed to get iovec from sqe, err=%d\n", >> +                    err); >> +        return err; >> +    } >> + >> +    err = -ENOMEM; >> +    if (!ring) { >> +        ring = fuse_uring_create(fc); >> +        if (!ring) >> +            return err; >> +    } >> + >> +    queue = ring->queues[cmd_req->qid]; >> +    if (!queue) { >> +        queue = fuse_uring_create_queue(ring, cmd_req->qid); >> +        if (!queue) >> +            return err; >> +    } >> + >> +    /* >> +     * The created queue above does not need to be destructed in >> +     * case of entry errors below, will be done at ring destruction >> time. >> +     */ >> + >> +    ring_ent = kzalloc(sizeof(*ring_ent), GFP_KERNEL_ACCOUNT); >> +    if (ring_ent == NULL) >> +        return err; >> + >> +    INIT_LIST_HEAD(&ring_ent->list); >> + >> +    ring_ent->queue = queue; >> +    ring_ent->cmd = cmd; > > nit: seems it's also set immediately after in > _fuse_uring_fetch(). > >> + >> +    err = -EINVAL; >> +    if (iov[0].iov_len < sizeof(struct fuse_uring_req_header)) { >> +        pr_info_ratelimited("Invalid header len %zu\n", iov[0].iov_len); >> +        goto err; >> +    } >> + > ... >> +/* >> + * Entry function from io_uring to handle the given passthrough command >> + * (op cocde IORING_OP_URING_CMD) >> + */ >> +int fuse_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags) >> +{ >> +    struct fuse_dev *fud; >> +    struct fuse_conn *fc; >> +    u32 cmd_op = cmd->cmd_op; >> +    int err; >> + >> +    /* Disabled for now, especially as teardown is not implemented >> yet */ >> +    pr_info_ratelimited("fuse-io-uring is not enabled yet\n"); >> +    return -EOPNOTSUPP; > > Do compilers give warnings about such things? Unreachable code, maybe. > I don't care much, but if they do to avoid breaking CONFIG_WERROR you > might want to do sth about it. E.g. I'd usually mark the function > __maybe_unused and not set it into fops until a later patch. I don't get any warning, but I can also do what you suggest. Thanks, Bernd