From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WnPr6GfR" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB4EAF9; Wed, 22 Nov 2023 07:19:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700666375; x=1732202375; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=nrNPcz4uYEQBP3pOrCUXcuO8X6G/FSLQKBhZfBz9dLY=; b=WnPr6GfRsmHheX8m0dMDThH9SdbMmURgop2QVRUSnHTfuQkivH84A0t1 lc+YRQ2nV87kyMZ5PhHTkOrh7Excs6jGFS/xofM/urtHV4kBMLhIvg1YF gVEFTOsy20Pn+yYCZ3a0AUvM63kxv2GSXq49MzmfaAS3T1NpXGd/0MHyG 5DH8aPv7m1cOXumvpMhYld46TIkpCZqp+oNcfN62jj09wTcEajPR8hT1h LuXAbfqp+oJY4ozRFRLCITIyEab3FsYIEtaPnftYgNfGlVQORA1+U0LD9 pwP+0AqQNgTATs0DjAIhfs1z99yaaRKKfBL7A3LnvNKXz+B4G4tssZRi8 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="390932784" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="390932784" 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: io-uring@vger.kernel.org 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