From: Jani Nikula <jani.nikula@linux•intel.com>
To: Christian Brauner <brauner@kernel•org>, linux-fsdevel@vger•kernel.org
Cc: Christoph Hellwig <hch@lst•de>, Jan Kara <jack@suse•cz>,
Vitaly Kuznetsov <vkuznets@redhat•com>,
Sean Christopherson <seanjc@google•com>,
Paolo Bonzini <pbonzini@redhat•com>,
Thomas Gleixner <tglx@linutronix•de>,
Ingo Molnar <mingo@redhat•com>, Borislav Petkov <bp@alien8•de>,
Dave Hansen <dave.hansen@linux•intel.com>,
x86@kernel•org, David Woodhouse <dwmw2@infradead•org>,
Paul Durrant <paul@xen•org>, Oded Gabbay <ogabbay@kernel•org>,
Wu Hao <hao.wu@intel•com>, Tom Rix <trix@redhat•com>,
Moritz Fischer <mdf@kernel•org>, Xu Yilun <yilun.xu@intel•com>,
Zhenyu Wang <zhenyuw@linux•intel.com>,
Zhi Wang <zhi.a.wang@intel•com>,
Joonas Lahtinen <joonas.lahtinen@linux•intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel•com>,
Tvrtko Ursulin <tvrtko.ursulin@linux•intel.com>,
David Airlie <airlied@gmail•com>, Daniel Vetter <daniel@ffwll•ch>,
Leon Romanovsky <leon@kernel•org>, Jason Gunthorpe <jgg@ziepe•ca>,
Frederic Barrat <fbarrat@linux•ibm.com>,
Andrew Donnellan <ajd@linux•ibm.com>,
Arnd Bergmann <arnd@arndb•de>,
Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
Eric Farman <farman@linux•ibm.com>,
Matthew Rosato <mjrosato@linux•ibm.com>,
Halil Pasic <pasic@linux•ibm.com>,
Vineeth Vijayan <vneethv@linux•ibm.com>,
Peter Oberparleiter <oberpar@linux•ibm.com>,
Heiko Carstens <hca@linux•ibm.com>,
Vasily Gorbik <gor@linux•ibm.com>,
Alexander Gordeev <agordeev@linux•ibm.com>,
Christian Borntraeger <borntraeger@linux•ibm.com>,
Sven Schnelle <svens@linux•ibm.com>,
Tony Krowiak <akrowiak@linux•ibm.com>,
Jason Herne <jjherne@linux•ibm.com>,
Harald Freudenberger <freude@linux•ibm.com>,
"Michael S. Tsirkin" <mst@redhat•com>,
Jason Wang <jasowang@redhat•com>,
Xuan Zhuo <xuanzhuo@linux•alibaba.com>,
Diana Craciun <diana.craciun@oss•nxp.com>,
Alex Williamson <alex.williamson@redhat•com>,
Eric Auger <eric.auger@redhat•com>, Fei Li <fei1.li@intel•com>,
Benjamin LaHaise <bcrl@kvack•org>,
Christian Brauner <brauner@kernel•org>,
Johannes Weiner <hannes@cmpxchg•org>,
Michal Hocko <mhocko@kernel•org>,
Roman Gushchin <roman.gushchin@linux•dev>,
Shakeel Butt <shakeelb@google•com>,
Muchun Song <muchun.song@linux•dev>,
Kirti Wankhede <kwankhede@nvidia•com>,
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 <axboe@kernel•dk>,
Pavel Begunkov <asml.silence@gmail•com>,
io-uring@vger•kernel.org
Subject: Re: [PATCH v2 2/4] eventfd: simplify eventfd_signal()
Date: Wed, 22 Nov 2023 17:19:06 +0200 [thread overview]
Message-ID: <877cm9n7dh.fsf@intel.com> (raw)
In-Reply-To: <20231122-vfs-eventfd-signal-v2-2-bd549b14ce0c@kernel.org>
On Wed, 22 Nov 2023, Christian Brauner <brauner@kernel•org> 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
next prev parent reply other threads:[~2023-11-22 15:19 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 12:48 [PATCH v2 0/4] eventfd: simplify signal helpers Christian Brauner
2023-11-22 12:48 ` [PATCH v2 1/4] i915: make inject_virtual_interrupt() void Christian Brauner
2023-11-22 15:05 ` Jan Kara
2023-11-23 0:24 ` Zhenyu Wang
2023-11-23 13:11 ` Christian Brauner
2023-11-22 12:48 ` [PATCH v2 2/4] eventfd: simplify eventfd_signal() Christian Brauner
2023-11-22 14:49 ` Xu Yilun
2023-11-22 15:05 ` Jan Kara
2023-11-22 15:19 ` Jani Nikula [this message]
2023-11-23 13:18 ` Christian Brauner
2023-11-24 2:02 ` Andrew Donnellan
2023-11-27 16:17 ` Eric Farman
2024-02-06 19:44 ` Stefan Hajnoczi
2024-02-07 14:33 ` Anthony Krowiak
2024-02-07 14:34 ` Paolo Bonzini
2024-02-08 9:02 ` Christian Brauner
2023-11-22 12:48 ` [PATCH v2 3/4] eventfd: simplify eventfd_signal_mask() Christian Brauner
2023-11-22 15:05 ` Jan Kara
2023-11-22 12:48 ` [PATCH v2 4/4] eventfd: make eventfd_signal{_mask}() void Christian Brauner
2023-11-22 15:06 ` Jan Kara
2023-11-23 19:43 ` [PATCH v2 0/4] eventfd: simplify signal helpers Jens Axboe
2023-11-24 7:47 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877cm9n7dh.fsf@intel.com \
--to=jani.nikula@linux$(echo .)intel.com \
--cc=agordeev@linux$(echo .)ibm.com \
--cc=airlied@gmail$(echo .)com \
--cc=ajd@linux$(echo .)ibm.com \
--cc=akrowiak@linux$(echo .)ibm.com \
--cc=alex.williamson@redhat$(echo .)com \
--cc=arnd@arndb$(echo .)de \
--cc=asml.silence@gmail$(echo .)com \
--cc=axboe@kernel$(echo .)dk \
--cc=bcrl@kvack$(echo .)org \
--cc=borntraeger@linux$(echo .)ibm.com \
--cc=bp@alien8$(echo .)de \
--cc=brauner@kernel$(echo .)org \
--cc=cgroups@vger$(echo .)kernel.org \
--cc=daniel@ffwll$(echo .)ch \
--cc=dave.hansen@linux$(echo .)intel.com \
--cc=diana.craciun@oss$(echo .)nxp.com \
--cc=dri-devel@lists$(echo .)freedesktop.org \
--cc=dwmw2@infradead$(echo .)org \
--cc=eric.auger@redhat$(echo .)com \
--cc=farman@linux$(echo .)ibm.com \
--cc=fbarrat@linux$(echo .)ibm.com \
--cc=fei1.li@intel$(echo .)com \
--cc=freude@linux$(echo .)ibm.com \
--cc=gor@linux$(echo .)ibm.com \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=hannes@cmpxchg$(echo .)org \
--cc=hao.wu@intel$(echo .)com \
--cc=hca@linux$(echo .)ibm.com \
--cc=hch@lst$(echo .)de \
--cc=intel-gfx@lists$(echo .)freedesktop.org \
--cc=intel-gvt-dev@lists$(echo .)freedesktop.org \
--cc=io-uring@vger$(echo .)kernel.org \
--cc=jack@suse$(echo .)cz \
--cc=jasowang@redhat$(echo .)com \
--cc=jgg@ziepe$(echo .)ca \
--cc=jjherne@linux$(echo .)ibm.com \
--cc=joonas.lahtinen@linux$(echo .)intel.com \
--cc=kvm@vger$(echo .)kernel.org \
--cc=kwankhede@nvidia$(echo .)com \
--cc=leon@kernel$(echo .)org \
--cc=linux-aio@kvack$(echo .)org \
--cc=linux-fpga@vger$(echo .)kernel.org \
--cc=linux-fsdevel@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mm@kvack$(echo .)org \
--cc=linux-rdma@vger$(echo .)kernel.org \
--cc=linux-s390@vger$(echo .)kernel.org \
--cc=linux-usb@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mdf@kernel$(echo .)org \
--cc=mhocko@kernel$(echo .)org \
--cc=mingo@redhat$(echo .)com \
--cc=mjrosato@linux$(echo .)ibm.com \
--cc=mst@redhat$(echo .)com \
--cc=muchun.song@linux$(echo .)dev \
--cc=netdev@vger$(echo .)kernel.org \
--cc=oberpar@linux$(echo .)ibm.com \
--cc=ogabbay@kernel$(echo .)org \
--cc=pasic@linux$(echo .)ibm.com \
--cc=paul@xen$(echo .)org \
--cc=pbonzini@redhat$(echo .)com \
--cc=rodrigo.vivi@intel$(echo .)com \
--cc=roman.gushchin@linux$(echo .)dev \
--cc=seanjc@google$(echo .)com \
--cc=shakeelb@google$(echo .)com \
--cc=svens@linux$(echo .)ibm.com \
--cc=tglx@linutronix$(echo .)de \
--cc=trix@redhat$(echo .)com \
--cc=tvrtko.ursulin@linux$(echo .)intel.com \
--cc=virtualization@lists$(echo .)linux-foundation.org \
--cc=vkuznets@redhat$(echo .)com \
--cc=vneethv@linux$(echo .)ibm.com \
--cc=x86@kernel$(echo .)org \
--cc=xuanzhuo@linux$(echo .)alibaba.com \
--cc=yilun.xu@intel$(echo .)com \
--cc=zhenyuw@linux$(echo .)intel.com \
--cc=zhi.a.wang@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox