Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1421619ybt; Thu, 9 Jul 2020 06:46:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA8uf4mlqFPgxb/Cm9HkOMh+Y+WkK3ShDk1RY78dATtzsNewnCHaDLpRdSkUjbsmoaWdfE X-Received: by 2002:aa7:c5d4:: with SMTP id h20mr70698824eds.115.1594302376654; Thu, 09 Jul 2020 06:46:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594302376; cv=none; d=google.com; s=arc-20160816; b=PbbBwaOV903Lb9mkw5M04C9FX+vMRERdBJ3Hw52K0PsyeqDqaztzw6E0w12rBhmLPq V5VhmGU9j/ESO60CGEEJ0jQXWf5aD9XU8scT0KIKAYqXMnJUjjyQk3xBmBHf5NEotZ2p qorPugsvacAVUxAaS+QPhS+mRQPpLr4f/DPtUjTgh76B6QX244QaibOqhRnJnvFoeNfb xyb4u6OxWViXMU2140MKa7tuqn8mJIc3esc9tFQs04Ph/2z1WSvtxvP1k/ChwRUt6L0u EVMXsa4tyIhv23CYDRxZldP2MNJD+OuZXrdNE8QwjQz5vrz7XKsMlBXPly2aw8ESu1n3 UmqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=7rOYKU4XztveD5i31wb3QbJ+1+S+S7EVYyvxSdJ1iFM=; b=A0rWFqVs6Zvbx4R200WtN17UR4cODORFfVUj8E2ou4JCXnhF8T4qFvgSPNQUhtr/FP RkfMW8j4vh5Q8Amc3GEvNeC/ljCSyQ8CV5yQDG4pXKEKPGgrQg5zQ9D/44kgjTNIhcxw CztpBmnebZU0vLEOLdLDw4cPo4x7QumdTlHdQ1STo0V/5wGzF01oHGcORycuvnVkpG0q rTIO7xWObHLmNePYO7MmxOP8G2Trj29+TNRgyKSyAgvRCrBjhnux+EBJWxfjbJuM8BoH opLcqhB1+DZqPWCQpxI+jv7JYzBYCZl5pqvXadrAhaNQ6lwX07r9u8J+1tCeVL9MffA7 YRMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=NFgYwB4A; 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 ca17si2020842ejb.533.2020.07.09.06.45.52; Thu, 09 Jul 2020 06:46:16 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=NFgYwB4A; 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 S1727850AbgGINnW (ORCPT + 99 others); Thu, 9 Jul 2020 09:43:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726480AbgGINnW (ORCPT ); Thu, 9 Jul 2020 09:43:22 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 401B4C08C5CE; Thu, 9 Jul 2020 06:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=7rOYKU4XztveD5i31wb3QbJ+1+S+S7EVYyvxSdJ1iFM=; b=NFgYwB4AfSfixGSTDV5fwWhcoX DO23STOr9Z3uquozmLEMTByMzstm5nYsixXwt7Y/NCLJqsAXLxmWiSerp+pMIiMnxPII+HB3CACGp oXJb3/YWxiPidACkUAcynOQ+moJc4SH4SCAhYL0wiMY38IzGb3po79KWdr4BNs44B6jJyJazldxS5 mr7FD6hblNBolK+BSxnnLsy5jJmhxXtZyK4lcmRfsXtDsce6hc+NjEE6Jsbd8t+ltZv6zCUjrBX3t xENvTNVLNh8fzy7IQM48Tu/JXAgrM1uWSGfTQYBNN4BWECFb+fiRFQ6oVzWrGIh8c07Vsz1/K97et 1e0VhbWQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtWpb-0001Gb-5I; Thu, 09 Jul 2020 13:43:19 +0000 Date: Thu, 9 Jul 2020 14:43:19 +0100 From: Matthew Wilcox To: Pavel Begunkov Cc: Christoph Hellwig , Jens Axboe , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, Kanchan Joshi , Javier Gonzalez Subject: Re: [PATCH 0/2] Remove kiocb ki_complete Message-ID: <20200709134319.GD12769@casper.infradead.org> References: <20200708222637.23046-1-willy@infradead.org> <20200709101705.GA2095@infradead.org> <20200709111036.GA12769@casper.infradead.org> <20200709132611.GA1382@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 09, 2020 at 04:37:59PM +0300, Pavel Begunkov wrote: > On 09/07/2020 16:26, Christoph Hellwig wrote: > > On Thu, Jul 09, 2020 at 12:10:36PM +0100, Matthew Wilcox wrote: > >> On Thu, Jul 09, 2020 at 11:17:05AM +0100, Christoph Hellwig wrote: > >>> I really don't like this series at all. If saves a single pointer > >>> but introduces a complicated machinery that just doesn't follow any > >>> natural flow. And there doesn't seem to be any good reason for it to > >>> start with. > >> > >> Jens doesn't want the kiocb to grow beyond a single cacheline, and we > >> want the ability to set the loff_t in userspace for an appending write, > >> so the plan was to replace the ki_complete member in kiocb with an > >> loff_t __user *ki_posp. > >> > >> I don't think it's worth worrying about growing kiocb, personally, > >> but this seemed like the easiest way to make room for a new pointer. > > > > The user offset pointer has absolutely no business in the the kiocb > > itself - it is a io_uring concept which needs to go into the io_kiocb, > > which has 14 bytes left in the last cache line in my build. It would > > fit in very well there right next to the result and user pointer. > > After getting a valid offset, io_uring shouldn't do anything but > complete the request. And as io_kiocb implicitly contains a CQE entry, > not sure we need @append_offset in the first place. > > Kanchan, could you take a look if you can hide it in req->cflags? No, that's not what cflags are for. And besides, there's only 32 bits there.