Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp4042510ybt; Sun, 5 Jul 2020 15:09:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyo8RrAWZDQdAc7ib/cvu1oDg8Ts0o27GsjzR2u1HeFAy5NwdVoDn3HL6ifiPJ2GJbpVDvR X-Received: by 2002:a17:906:1f52:: with SMTP id d18mr28644053ejk.84.1593986966419; Sun, 05 Jul 2020 15:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593986966; cv=none; d=google.com; s=arc-20160816; b=0zyoCkZXJiUXhRqleCLWYgD3yDnhYnHgFF4koU69694tx/zwIZ5wNe6X1Zn78SomZ/ 1EQRpVfpXUSVeoczWMFuu2gStSXm7Fl1yoq/9SAzlQkBxtz0f3QUBWnJzE524M3Tr79r fVe3WspGWo8uJ9UpV4jDqFy99JHFQ7N6v0UgNnd5tqWoKJUkDZwU5nRun9UIEnUZwwlq pU8yzWWI1IitZpCdfBNi8y8KYl2UQ6gJjqO5TIlFkUeMAvqV6hcmu5wD0rs7Xv10siLm d8cPnDDoi9142Bi41Em9bhOODmR2p5mkA1hDaBQZlBooDNS+ARhmwv9r0Ntg4AoUmMTk tuog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Mm/FeRk+VterD5eerr9+vft2Gtim5uQSQoEoEmvX1M0=; b=taJFEHV+I+acSokgdxx+YaSk4nS+6V4dgbrM1B7U9/Zvd3cZuAPlYcT6165GRA7yrv utpz+FI8CKIQxnq178bnOZ4hVIxlRP5+BTTdTrFKtZsYq1uVAw2ytLEDeAba45WmhNlD fPTf0s5UMBeio4k+OMrdSXl+UXFagOZW3Rh5JqaC6OjOSCsb4nfR/sS4catbq+O/bLG8 CKTUF6qao7Q0HfwsSGQ3mdJwYj/5QJ1NJUQBL1qsbplfCNVfJpsECmF3tBkwtuVatPUU h5vAH9PG9HkKmVUc57QUiYpB+7QgQM28jQj+1F9+xK+EIzkHsBZ7iwKLHPqCVN/LVX04 6Oyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=Cw7UBemU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k8si10823779ejs.735.2020.07.05.15.09.03; Sun, 05 Jul 2020 15:09:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=Cw7UBemU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727842AbgGEVMy (ORCPT + 99 others); Sun, 5 Jul 2020 17:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727785AbgGEVMy (ORCPT ); Sun, 5 Jul 2020 17:12:54 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B329C061794 for ; Sun, 5 Jul 2020 14:12:54 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id 207so15948738pfu.3 for ; Sun, 05 Jul 2020 14:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Mm/FeRk+VterD5eerr9+vft2Gtim5uQSQoEoEmvX1M0=; b=Cw7UBemUqtAHuKz2287un9lydfsBrUi6DpmddxDJfUDffEPqvtoucQ5Uv11Goy6E/8 uE9aXvqYkJaiJ0aN7shpym6uTB+GJC2OHH/EY0gcuGFUrr7hZrAKcgOIribrvB/YJS7R sX0GoDH3ixm2lmBcUpwmIHb34CkkpfkbW8zj1MhixGT+Jeza70/02R4qRrsUQyeuv+hr jqqHoYTzyDkJOzT9ma8gV5npnIMNVtbFNwYojPNRMkev5ZVzJYuhVp98pA3g2VpllmGq wnJklGWnuVm24dPoL0Rpg3BRN1InlprLFDRt26I6wkI5fb+oSpfUKzYoAqvGga3KfJPC YYRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Mm/FeRk+VterD5eerr9+vft2Gtim5uQSQoEoEmvX1M0=; b=tK3r3oiRJUQbQRmVzUJRESJm2CNovYkZCttyTxcnZvORY95YTyYCKboOnc1bonIFw1 i0C1MXLNs1+10gbFp99CuN3cZMB+saVCKLjXcknffqIK4lILwlwQIyB/t6WXcvj1/bjU QTZjc3WMHjZE43ZmLWgpVSivZ7J2jXooayLMQ/bmZVNsYbSvtczJOKrzf/1m96zHDjeI oopWF8VEbBFiVKORk1uQQvNCZ/F/N6HfhOzOABsdyfJYP7RQXJEfueeufKZwV+drccqt WOCSXZg3koD1Y+nowZSck6e+YR4pzCmgKOfhrAP/mkM9pvpdqBK0KRXS8uzmpR2kyXOg EV2g== X-Gm-Message-State: AOAM5302soHRRYvMHzzNWHdCVw7Ed5NAWr2x9i20UcNf+1WVan3ZGAhU Muj76QlwEcaUSoosGzX8kpC05w== X-Received: by 2002:a65:584e:: with SMTP id s14mr36628575pgr.151.1593983573593; Sun, 05 Jul 2020 14:12:53 -0700 (PDT) Received: from [192.168.1.182] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id h100sm16913840pjb.46.2020.07.05.14.12.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Jul 2020 14:12:52 -0700 (PDT) Subject: Re: [PATCH v3 4/4] io_uring: add support for zone-append To: Matthew Wilcox Cc: Kanchan Joshi , viro@zeniv.linux.org.uk, bcrl@kvack.org, hch@infradead.org, Damien.LeMoal@wdc.com, asml.silence@gmail.com, linux-fsdevel@vger.kernel.org, mb@lightnvm.io, linux-kernel@vger.kernel.org, linux-aio@kvack.org, io-uring@vger.kernel.org, linux-block@vger.kernel.org, Selvakumar S , Nitesh Shetty , Javier Gonzalez References: <1593974870-18919-1-git-send-email-joshi.k@samsung.com> <1593974870-18919-5-git-send-email-joshi.k@samsung.com> <20200705210947.GW25523@casper.infradead.org> From: Jens Axboe Message-ID: <239ee322-9c38-c838-a5b2-216787ad2197@kernel.dk> Date: Sun, 5 Jul 2020 15:12:50 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200705210947.GW25523@casper.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/5/20 3:09 PM, Matthew Wilcox wrote: > On Sun, Jul 05, 2020 at 03:00:47PM -0600, Jens Axboe wrote: >> On 7/5/20 12:47 PM, Kanchan Joshi wrote: >>> From: Selvakumar S >>> >>> For zone-append, block-layer will return zone-relative offset via ret2 >>> of ki_complete interface. Make changes to collect it, and send to >>> user-space using cqe->flags. >>> >>> Signed-off-by: Selvakumar S >>> Signed-off-by: Kanchan Joshi >>> Signed-off-by: Nitesh Shetty >>> Signed-off-by: Javier Gonzalez >>> --- >>> fs/io_uring.c | 21 +++++++++++++++++++-- >>> 1 file changed, 19 insertions(+), 2 deletions(-) >>> >>> diff --git a/fs/io_uring.c b/fs/io_uring.c >>> index 155f3d8..cbde4df 100644 >>> --- a/fs/io_uring.c >>> +++ b/fs/io_uring.c >>> @@ -402,6 +402,8 @@ struct io_rw { >>> struct kiocb kiocb; >>> u64 addr; >>> u64 len; >>> + /* zone-relative offset for append, in sectors */ >>> + u32 append_offset; >>> }; >> >> I don't like this very much at all. As it stands, the first cacheline >> of io_kiocb is set aside for request-private data. io_rw is already >> exactly 64 bytes, which means that you're now growing io_rw beyond >> a cacheline and increasing the size of io_kiocb as a whole. >> >> Maybe you can reuse io_rw->len for this, as that is only used on the >> submission side of things. > > I'm surprised you aren't more upset by the abuse of cqe->flags for the > address. Yeah, it's not great either, but we have less leeway there in terms of how much space is available to pass back extra data. > What do you think to my idea of interpreting the user_data as being a > pointer to somewhere to store the address? Obviously other things > can be stored after the address in the user_data. I don't like that at all, as all other commands just pass user_data through. This means the application would have to treat this very differently, and potentially not have a way to store any data for locating the original command on the user side. > Or we could have a separate flag to indicate that is how to interpret > the user_data. I'd be vehemently against changing user_data in any shape or form. It's to be passed through from sqe to cqe, that's how the command flow works. It's never kernel generated, and it's also used as a key for command lookup. -- Jens Axboe