Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp4012903ybt; Sun, 5 Jul 2020 14:01:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQBLeCFcgYS176s6dJOOrfU4tukcvLv5suXFS5u7L9aDloR+W6pc7pHvwy3F2Hq0X0gWX4 X-Received: by 2002:a17:906:7017:: with SMTP id n23mr24524270ejj.262.1593982896309; Sun, 05 Jul 2020 14:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593982896; cv=none; d=google.com; s=arc-20160816; b=izIymAjn/adx9WeU7m6UjLY7y7ZPcscW8PjKPyyvZBGyJ+YVIM9Q2M4FcEp54t8UZk nQksAlA+iuYfris0Kouer2oRBQv0oE0n29QFsmf3SEubwmNwW10HCsKH4I8f3QTAcu7u K6RpU7MtLFQcYaErTttAwaP2GCiddEhXZ6j+3d/sdGzlIAS8b7uL0ANjE9weSrIgrKys Du/W8pxJcxRgUW1+PoWgfeYK5muqYEsVEFHIIsOJYE6rYAnnO9PrM2nTG3wm5gb8sbL4 8UXrZmvV+N/v2wvfYJahDesixshHsqfHfsfFzgz3EeUWqxfMlD428LrudDgCJi3Cue0c aPFQ== 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=bufUwvRb4yy/35PtxLSIA3L2e6YgBS0471hx6c+GstA=; b=h6y03dWDbtI0DSeMlDoicbruhAJ9+RdY1AeX+EAskpvp3QcvKmdQloDN6k5btIuwVe zbqW/PfY7jMVIzjhcUPHz+lbfSR5oe1ldzgufSWiApVEVBpmwWCR5o0jGMFESoFx6J9z VQkYzoyuzKuEB82WFfSp7+IdhtPP/nCY7DvHlASZHJBPh091EYo16f1uLZgeruV95n5l mqPmPONRt6wYLrsX938x04On7xhW8R30h7jwgrAtx2p6p4YKHforY2CbUDGi3Gm+tiJT 2zpuOtqSGBCEl4euhLM9rsVrsFa6q4NJTDk5OsKIxfNL7Y/v9+ZO1O0Kt70uOqG7IzJW fsLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=N3kJT8gT; 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 dm24si11543852edb.435.2020.07.05.14.01.13; Sun, 05 Jul 2020 14:01:36 -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=N3kJT8gT; 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 S1728364AbgGEVAx (ORCPT + 99 others); Sun, 5 Jul 2020 17:00:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728261AbgGEVAw (ORCPT ); Sun, 5 Jul 2020 17:00:52 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EABBFC061794 for ; Sun, 5 Jul 2020 14:00:51 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id e8so17461186pgc.5 for ; Sun, 05 Jul 2020 14:00:51 -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=bufUwvRb4yy/35PtxLSIA3L2e6YgBS0471hx6c+GstA=; b=N3kJT8gTEH1WY2Ds60BxW/W7rgnScY269vLCmYtCXPVCXVbjq6XFoBe8sMdTH9k+l9 ampNfLOofuJqXQVlSJHOiWKHMCJpgSfG+I2FNNWsWWyGmDI83WahiQ8M3oL8Ksc3nWzc O4j6QyqhUNEwVG59tV7VG0NPl+lrf32quMVRAOXsVGPdLAKBm3jKXZtkm+hNG+HtfdD+ H4x829WDxvIySn3f6KijERoSMb2p87c957/ieo32VqE2rXCu+D/L/CF9e4XS6/su7q5H 6sgcb0rbVUw+SsbYIP0W4LLfQFk/ug0npggIGlppH+rmFldP6fsoxiJmbG1cBi79TJ19 5GPw== 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=bufUwvRb4yy/35PtxLSIA3L2e6YgBS0471hx6c+GstA=; b=QhKVUf40o4uin/XraIfZxHCVV7kTxEwRzS2O+x6FPWACkDl+0rD7X9fGBfRgA/4cVm C6IabIkKDEXIVryqRMCLZEJFpnjQANVTgXrNjy5c1uv2KZB9mGIOk+6G5yVTKVZigWzQ 7p2lz0yg/NPWwZGlFLlKJMVYVytk7o1RqMkAnrr2FrEPbu5LJwzG0uo00cu2zv6UIv3M 6HqVaL2GZtpCxHRU4WnlhkOQfUvqEw4lTTIMqYJNX4oW9sfJMsyckW8CLzFc3iXuHPl6 fW55ZHw1arEBJXbEChdCHsWoPfog8504PGV/bimS169JTphKEt+4zSJPQVzrrAPs6x5v kPgA== X-Gm-Message-State: AOAM532IL5xAtBGmMxoGgdfxgiBHvNm0KrQfapouT6cjJfBrJ3VQ4z8R iOKaoIjLx9hUfDZDD8uqCz1GYQ== X-Received: by 2002:a63:7a56:: with SMTP id j22mr37715625pgn.293.1593982849816; Sun, 05 Jul 2020 14:00:49 -0700 (PDT) Received: from [192.168.1.182] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id g7sm15959583pfh.210.2020.07.05.14.00.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Jul 2020 14:00:49 -0700 (PDT) Subject: Re: [PATCH v3 4/4] io_uring: add support for zone-append To: Kanchan Joshi , viro@zeniv.linux.org.uk, bcrl@kvack.org Cc: 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> From: Jens Axboe Message-ID: Date: Sun, 5 Jul 2020 15:00:47 -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: <1593974870-18919-5-git-send-email-joshi.k@samsung.com> 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 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. -- Jens Axboe