From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C3214F1F0 for ; Wed, 22 Nov 2023 15:19:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jZch6GFZ" Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8F33961244 for ; Wed, 22 Nov 2023 15:19:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8F33961244 Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=jZch6GFZ X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -4.301 X-Spam-Level: Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mo_K0ALP7BQY for ; Wed, 22 Nov 2023 15:19:34 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by smtp3.osuosl.org (Postfix) with ESMTPS id 4A3516101B for ; Wed, 22 Nov 2023 15:19:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4A3516101B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700666374; x=1732202374; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=nrNPcz4uYEQBP3pOrCUXcuO8X6G/FSLQKBhZfBz9dLY=; b=jZch6GFZuvc4KL5mmkDJyV/wv9A/+3fph73dCCyQHaqJCLL0lT8/Syuo Ip6wdwnMOPOZZMEaRdsky+tmRcl7V08f5qMSEKjiyY0c006XuCCvx/sJx U91LzWyI5CGwEOgw5e8aSMOfICogT0vC9QE4dR8nw3HuMuVeM3RgxeyPL UyK9lTpos9um7WLiGkaqTt/Tb5hWF5htNMgccLLbexdE5E4Q+r5TAXysJ ekiv1MYgdTsGxvKXkTTm+qJ+qLECo9ljSstZO5cE3Ur1yGjpf7pWT8dyU UZzfRrb3ZBVIv1A4VV6aLtHL7aB4GcYwmOUkkouLa1MuVGDghYP4ESf2V g==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="390932762" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="390932762" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 07:19:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="833052538" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="833052538" Received: from tjquresh-mobl.ger.corp.intel.com (HELO localhost) ([10.252.41.76]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 07:19:09 -0800 From: Jani Nikula To: Christian Brauner , linux-fsdevel@vger.kernel.org Cc: Christoph Hellwig , Jan Kara , Vitaly Kuznetsov , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, David Woodhouse , Paul Durrant , Oded Gabbay , Wu Hao , Tom Rix , Moritz Fischer , Xu Yilun , Zhenyu Wang , Zhi Wang , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Leon Romanovsky , Jason Gunthorpe , Frederic Barrat , Andrew Donnellan , Arnd Bergmann , Greg Kroah-Hartman , Eric Farman , Matthew Rosato , Halil Pasic , Vineeth Vijayan , Peter Oberparleiter , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Tony Krowiak , Jason Herne , Harald Freudenberger , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , Diana Craciun , Alex Williamson , Eric Auger , Fei Li , Benjamin LaHaise , Christian Brauner , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Kirti Wankhede , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fpga@vger.kernel.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-rdma@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-usb@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-aio@kvack.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Jens Axboe , Pavel Begunkov , io-uring@vger.kernel.org Subject: Re: [PATCH v2 2/4] eventfd: simplify eventfd_signal() In-Reply-To: <20231122-vfs-eventfd-signal-v2-2-bd549b14ce0c@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20231122-vfs-eventfd-signal-v2-0-bd549b14ce0c@kernel.org> <20231122-vfs-eventfd-signal-v2-2-bd549b14ce0c@kernel.org> Date: Wed, 22 Nov 2023 17:19:06 +0200 Message-ID: <877cm9n7dh.fsf@intel.com> Precedence: bulk X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Wed, 22 Nov 2023, Christian Brauner wrote: > diff --git a/fs/eventfd.c b/fs/eventfd.c > index 33a918f9566c..dc9e01053235 100644 > --- a/fs/eventfd.c > +++ b/fs/eventfd.c > @@ -74,20 +74,17 @@ __u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, __poll_t mask) > /** > * eventfd_signal - Adds @n to the eventfd counter. This still refers to @n here, and in patch 4. BR, Jani. > * @ctx: [in] Pointer to the eventfd context. > - * @n: [in] Value of the counter to be added to the eventfd internal counter. > - * The value cannot be negative. > * > * This function is supposed to be called by the kernel in paths that do not > * allow sleeping. In this function we allow the counter to reach the ULLONG_MAX > * value, and we signal this as overflow condition by returning a EPOLLERR > * to poll(2). > * > - * Returns the amount by which the counter was incremented. This will be less > - * than @n if the counter has overflowed. > + * Returns the amount by which the counter was incremented. > */ > -__u64 eventfd_signal(struct eventfd_ctx *ctx, __u64 n) > +__u64 eventfd_signal(struct eventfd_ctx *ctx) > { > - return eventfd_signal_mask(ctx, n, 0); > + return eventfd_signal_mask(ctx, 1, 0); > } > EXPORT_SYMBOL_GPL(eventfd_signal); > -- Jani Nikula, Intel