From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08B63C388F9 for ; Sat, 21 Nov 2020 17:07:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2A4422202 for ; Sat, 21 Nov 2020 17:07:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727212AbgKURHX (ORCPT ); Sat, 21 Nov 2020 12:07:23 -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