Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2112844pxb; Sat, 21 Nov 2020 09:11:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXlvyKAl4Sx0clH+nqHcUa3Tg44en6a0njOvC8xFQcA6PbZXdhbQ8BkuZTW4BlOXsWqUTz X-Received: by 2002:a05:6402:cb4:: with SMTP id cn20mr42327106edb.186.1605978707237; Sat, 21 Nov 2020 09:11:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605978707; cv=none; d=google.com; s=arc-20160816; b=sCPDIAdk33Q6l7RKpCMaRyZWqaOAHFosBzJkkxW6umrTJ7uLDjKy67L8Src/7ZnaT9 sOMx33bUtFOZKrQEP3T4SSfZYRPjZbF+76nXsv7mbJ7qESR0HfSlkuLbjJwOtxiM41F/ TaeOzLWnFQQLTXnhDpzxlC6ObmMyVNFPk++VCsRBfbdf6tq6ZFYFbwKXy3BoKKXYYxO+ K67FdzJsWuCA29sgW/iVgv+tsYD083KRb0NnWLW7kMd1yxAhAZm/yr2klW2EdLVH8Lkr ssLCl0P3waPgNBCow/ns58I6A6hCfZrdaEQOOZVSyu2Lg+xH2CPjSriEYXrCTrSxmZjB NKXA== 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; bh=1bgaNx7XzCt9HKYVeEngrlU3Ui8MfIqQlzwrKYIBWog=; b=IsWrnYoX6T+iUrKFypeg+4VCg5wXX9LJgMTM5DJ3SQ36hDvdw7KQhnSkKyGd3xhUAm MAyFlMu4nNcTWchMfJVzSG07pRYj39WQpYsqdylSRfZQHmyJYXtpNLdGMha9a9nXZEBD z69JxChryC5As7DpIKvnPlf4uh0JPAXTAhYiEl8e+QGIFdBL2oS52klql+0tAZ7ps3tR 7nWxdaRoXTgw78rwmR1rS9XlKPLMpSsWsooEx9nS01MqZFssKlcKsvvruuZCGeATmKGW QwndK8rCNmh7OvZP38RoyeS3r7zkxMF6UVYi4IY+98UvBQCfiWOf2NSflXo5ooYs6Wmf oclQ== ARC-Authentication-Results: i=1; mx.google.com; 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 c17si3745634ejr.574.2020.11.21.09.11.23; Sat, 21 Nov 2020 09:11:47 -0800 (PST) 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; 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 S1727159AbgKURHW (ORCPT + 99 others); Sat, 21 Nov 2020 12:07:22 -0500 Received: from mx2.suse.de ([195.135.220.15]:35152 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726672AbgKURHW (ORCPT ); Sat, 21 Nov 2020 12:07:22 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C2763AC23; Sat, 21 Nov 2020 17:07:20 +0000 (UTC) Received: by lion.mk-sys.cz (Postfix, from userid 1000) id 7D1A9604E7; Sat, 21 Nov 2020 18:07:20 +0100 (CET) Date: Sat, 21 Nov 2020 18:07:20 +0100 From: Michal Kubecek To: Christoph Hellwig Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, Jens Axboe , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] eventfd: convert to ->write_iter() Message-ID: <20201121170720.vommk4ia25un4ofh@lion.mk-sys.cz> References: <20201119180315.GB24054@infradead.org> <20201119184610.sxc7utcsfwsqvwu5@lion.mk-sys.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201119184610.sxc7utcsfwsqvwu5@lion.mk-sys.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 19, 2020 at 07:46:10PM +0100, Michal Kubecek wrote: > On Thu, Nov 19, 2020 at 06:03:15PM +0000, Christoph Hellwig wrote: > > On Thu, Nov 19, 2020 at 07:00:19PM +0100, Michal Kubecek wrote: > > > While eventfd ->read() callback was replaced by ->read_iter() recently by > > > commit 12aceb89b0bc ("eventfd: convert to f_op->read_iter()"), ->write() > > > was not replaced. > > > > > > Convert also ->write() to ->write_iter() to make the interface more > > > consistent and allow non-blocking writes from e.g. io_uring. Also > > > reorganize the code and return value handling in a similar way as it was > > > done in eventfd_read(). > > > > But this patch does not allow non-blocking writes. I'm really > > suspicious as you're obviously trying to hide something from us. > > I already explained what my original motivation was and explained that > it's no longer the case as the third party module that inspired me to > take a look at this can be easily patched not to need kernel_write() to > eventfd - and that it almost certainly will have to be patched that way > anyway. BtW, the reason I did not mention out of tree modules in the > commit message was exactly this: I suspected that any mention of them > could be a red flag for some people. > > I believed - and I still believe - that this patch is useful for other > reasons and Jens added another. Therefore I resubmitted with commit > message rewritten as requested, even if I don't need it personally. I'm > not hiding anything and I don't have time for playing your political > games and suffer your attacks. If they are more important than improving > kernel code, so be it. I'm annoyed enough and I don't care any more. Just few hours later, a new version of the product was released where the module still calls file->f_op->write() directly as it did before but they use a dedicated userspace buffer for this kernel write. Whatever I think about their solution, the result is that right now their module works with current mainline but it would break with this patch. So much for hidden agenda... For the record, I still believe this patch is the right thing to do. Michal Kubecek