Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3801854rwr; Sun, 7 May 2023 20:38:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ42+R3RADrlWYjJ+xah4nXZteKy+wX5bvDxxFM7tULpdIVqGgwtpi3Klk1yOiXkvgF1nar/ X-Received: by 2002:a17:90a:df07:b0:24d:ecf7:cabb with SMTP id gp7-20020a17090adf0700b0024decf7cabbmr8939464pjb.22.1683517128600; Sun, 07 May 2023 20:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683517128; cv=none; d=google.com; s=arc-20160816; b=Zc7ZLf6RMKLU/w/PfYEZKmQ4f4UOBXm2+A1uvuGjSpQhTHFvpKmEz4IVhVET1YRajU 8J/ECupKeE4vHiAw8oFOtUgr42t0Ee5DiUtt5/kU03xwrMccGAksefbe/Xd9yA+Vl3w7 J4hTpmUZrozVWXFLDHSwQtRjwYCGp7yVfpxqZm2z9P/yT/XW10OU/bIUc0rEwQBpbMOh 8YC7hetheJ42/ncwf3YcvuGv7AvzMc66skB300vchqOr1QM5hzJFqbsoivriscJ54gnI mrH+UziihIOn3rQBs66wnPf/3jJlbt0i6yzwYj0/3m+dSl4dNGXXi6TjUj3Ql6uLwE/Y lDhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Z6TSnkERdwXl1bzYWkrNGEY8R3ItHdA5poRBtKCKBUQ=; b=XNZaNSGH4anvyr0GZlZcd6YuPya9ZZ5OVd/HBqt01DuZJdSioAbTKbtyzbW3AnwqST H5H6tYapw/jzRPduqyIK1sbJyVApySzT4buvGFS3Sjyg+N6qvmhmI3NporkB3Gdyi9vx 45o3BoS+TBIjwcd+D2k9FtMH9ctqb35g8UAgApIjrsbIK53+cc4I/RQwf85f0OqbDG+c OAqByTT8PPFqjn/GM+CyqJs0sf6TzEKpfWKBybx/+gEqCsnUrcv9NZ3mTyyLCYzYek+0 KvPIUtaF9XK4w6pOH/RWDxAAQyuN+k+Pkg+J1iSmdNs/CA1tCxFueMxnuyS9MIC1u8/0 iFIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HGtUFwdH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w24-20020a639358000000b0051b8ec45689si7018163pgm.520.2023.05.07.20.38.33; Sun, 07 May 2023 20:38:48 -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=@chromium.org header.s=google header.b=HGtUFwdH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231833AbjEHDS7 (ORCPT + 99 others); Sun, 7 May 2023 23:18:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231234AbjEHDS5 (ORCPT ); Sun, 7 May 2023 23:18:57 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFD64A24A for ; Sun, 7 May 2023 20:18:55 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1ab14cb3aaeso27629875ad.2 for ; Sun, 07 May 2023 20:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1683515935; x=1686107935; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Z6TSnkERdwXl1bzYWkrNGEY8R3ItHdA5poRBtKCKBUQ=; b=HGtUFwdH62bhvHTDQJDJvcj/pZK5lOOSKNQGuqL3ImStRkfh8067wgSEp3VXxrLGad eQS51NsapjzZ3e2XRksshuMsy1US9lKmpZ3Qq2LcytuidewDXgjMdyBFodZ3y6y4dqcR IBGgV1dpw/XR0LDs2UOzCxktcAX/F12Iy9oV8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683515935; x=1686107935; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Z6TSnkERdwXl1bzYWkrNGEY8R3ItHdA5poRBtKCKBUQ=; b=WYFgSP/X4/rRe08EOe42zCEAITKhN6VdA24xlT6zkLNkoq16GouEggkH5N2lVzI6po gtfd9VDZPFsdApYA7PF+zix2Cm0gQzYUYlGPwI9p0zQqairj2S9W9aZoI8njaWyZ5/0Z ml/4D3zKAfsyJ17kSnQEpvu4SmtMGnCUctxzlQiCUix95UeHsMa0n9DUvDmzX7qhplJF gYiskkDmK2phSxiDLIFGUReFwKwNsl5iw2qtG4LJFxULbM5rYSxZWKTc7OX9Gc0jpbCx Ng1DaaOCHwJ/VWB7IXCk6BROC2FXxuV+eBgnqrtDNYNhSJ+x/0NDbo1uGO6bxutqCpFm HFJA== X-Gm-Message-State: AC+VfDwPZ5thDt9a8T1th9lPEUH4LXgvifK0O5mz8xVravjE8zuqzXkn +1a2/1iWdTTdq89ECRpgnsz3QGP7ab/1WFh7pgE= X-Received: by 2002:a17:902:7e84:b0:1a6:f755:a4a0 with SMTP id z4-20020a1709027e8400b001a6f755a4a0mr8198049pla.58.1683515935349; Sun, 07 May 2023 20:18:55 -0700 (PDT) Received: from google.com ([2401:fa00:1:10:526f:c8c9:de13:77a]) by smtp.gmail.com with ESMTPSA id f12-20020a170902ab8c00b001a060007fcbsm5877550plr.213.2023.05.07.20.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 20:18:55 -0700 (PDT) Date: Mon, 8 May 2023 11:18:52 +0800 From: Chen-Yu Tsai To: Jens Axboe , Linus Torvalds Cc: Linus Torvalds , io-uring , linux-kernel@vger.kernel.org Subject: Re: [GIT PULL] Final io_uring updates for 6.4-rc1 Message-ID: <20230508031852.GA4029098@google.com> References: <9b2e791d-aeba-a2c7-1877-797ff5c680a3@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9b2e791d-aeba-a2c7-1877-797ff5c680a3@kernel.dk> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi, On Sun, May 07, 2023 at 06:00:48AM -0600, Jens Axboe wrote: > Hi Linus, > > Nothing major in here, just two different parts: > > - Small series from Breno that enables passing the full SQE down > for ->uring_cmd(). This is a prerequisite for enabling full network > socket operations. Queued up a bit late because of some stylistic > concerns that got resolved, would be nice to have this in 6.4-rc1 > so the dependent work will be easier to handle for 6.5. > > - Fix for the huge page coalescing, which was a regression introduced > in the 6.3 kernel release (Tobias). > > Note that this will throw a merge conflict in the ublk_drv code, due > to this branch still being based off the original for-6.4/io_uring > branch. Resolution is pretty straight forward, I'm including it below > for reference. > > Please pull! > > > The following changes since commit 3c85cc43c8e7855d202da184baf00c7b8eeacf71: > > Revert "io_uring/rsrc: disallow multi-source reg buffers" (2023-04-20 06:51:48 -0600) > > are available in the Git repository at: > > git://git.kernel.dk/linux.git tags/for-6.4/io_uring-2023-05-07 > > for you to fetch changes up to d2b7fa6174bc4260e496cbf84375c73636914641: > > io_uring: Remove unnecessary BUILD_BUG_ON (2023-05-04 08:19:05 -0600) > > ---------------------------------------------------------------- > for-6.4/io_uring-2023-05-07 > > ---------------------------------------------------------------- > Breno Leitao (3): > io_uring: Create a helper to return the SQE size > io_uring: Pass whole sqe to commands This commit causes broken builds when IO_URING=n and NVME_CORE=y, as io_uring_sqe_cmd(), called in drivers/nvme/host/ioctl.c, ends up being undefined. This was also reported [1] by 0-day bot on your branch yesterday, but it's worse now that Linus merged the pull request. Not sure what the better fix would be. Move io_uring_sqe_cmd() outside of the "#if defined(CONFIG_IO_URING)" block? ChenYu [1] https://lore.kernel.org/all/202305080039.r7cguaXB-lkp@intel.com/ > io_uring: Remove unnecessary BUILD_BUG_ON > > Tobias Holl (1): > io_uring/rsrc: check for nonconsecutive pages > > drivers/block/ublk_drv.c | 26 +++++++++++++------------- > drivers/nvme/host/ioctl.c | 2 +- > include/linux/io_uring.h | 7 ++++++- > io_uring/io_uring.h | 10 ++++++++++ > io_uring/opdef.c | 2 +- > io_uring/rsrc.c | 7 ++++++- > io_uring/uring_cmd.c | 12 +++--------- > io_uring/uring_cmd.h | 8 -------- > 8 files changed, 40 insertions(+), 34 deletions(-) > > Merge resolution: > > commit 775e045e380626ce769d95badc79ea08edc1b15d > Merge: efd141da30bb d2b7fa6174bc > Author: Jens Axboe > Date: Thu May 4 08:22:24 2023 -0600 > > Merge branch 'for-6.4/io_uring' into test > > * for-6.4/io_uring: > io_uring: Remove unnecessary BUILD_BUG_ON > io_uring: Pass whole sqe to commands > io_uring: Create a helper to return the SQE size > io_uring/rsrc: check for nonconsecutive pages > > Signed-off-by: Jens Axboe > > diff --cc drivers/block/ublk_drv.c > index 72a5cde9a5af,42f4d7ca962e..0af6a41f92b2 > --- a/drivers/block/ublk_drv.c > +++ b/drivers/block/ublk_drv.c > @@@ -1397,23 -1362,6 +1397,23 @@@ static int __ublk_ch_uring_cmd(struct i > return -EIOCBQUEUED; > } > > +static int ublk_ch_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags) > +{ > - struct ublksrv_io_cmd *ub_src = (struct ublksrv_io_cmd *) cmd->cmd; > ++ const struct ublksrv_io_cmd *ub_src = io_uring_sqe_cmd(cmd->sqe); > + struct ublksrv_io_cmd ub_cmd; > + > + /* > + * Not necessary for async retry, but let's keep it simple and always > + * copy the values to avoid any potential reuse. > + */ > + ub_cmd.q_id = READ_ONCE(ub_src->q_id); > + ub_cmd.tag = READ_ONCE(ub_src->tag); > + ub_cmd.result = READ_ONCE(ub_src->result); > + ub_cmd.addr = READ_ONCE(ub_src->addr); > + > + return __ublk_ch_uring_cmd(cmd, issue_flags, &ub_cmd); > +} > + > static const struct file_operations ublk_ch_fops = { > .owner = THIS_MODULE, > .open = ublk_ch_open, > @@@ -2240,9 -2171,8 +2240,9 @@@ exit > static int ublk_ctrl_uring_cmd(struct io_uring_cmd *cmd, > unsigned int issue_flags) > { > - struct ublksrv_ctrl_cmd *header = (struct ublksrv_ctrl_cmd *)cmd->cmd; > + const struct ublksrv_ctrl_cmd *header = io_uring_sqe_cmd(cmd->sqe); > struct ublk_device *ub = NULL; > + u32 cmd_op = cmd->cmd_op; > int ret = -EINVAL; > > if (issue_flags & IO_URING_F_NONBLOCK) > > -- > Jens Axboe > >