From: Isaac Manjarres <isaacmanjarres@google.com>
To: Mateusz Guzik <mjguzik@gmail.com>
Cc: tglx@linutronix.de, "Rafael J. Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
saravanak@google.com, Manish Varma <varmam@google.com>,
Kelly Rossmoyer <krossmo@google.com>,
kernel-team@android.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v5] fs: Improve eventpoll logging to stop indicting timerfd
Date: Wed, 3 Jul 2024 14:37:12 -0700 [thread overview]
Message-ID: <ZoXEiCvdNRr_tj2N@google.com> (raw)
In-Reply-To: <4x5wsktkcwt7einzjowricl27pzusx6ggls43zionql7ixi5cz@icbegmuqqxcl>
On Tue, Jun 25, 2024 at 07:58:43PM +0200, Mateusz Guzik wrote:
> On Thu, Jun 06, 2024 at 10:28:11AM -0700, Isaac J. Manjarres wrote:
> > +static atomic_t wakesource_create_id = ATOMIC_INIT(0);
> > static const struct file_operations eventpoll_fops;
> >
> > static inline int is_file_epoll(struct file *f)
> > @@ -1545,15 +1546,21 @@ static int ep_create_wakeup_source(struct epitem *epi)
> > {
> > struct name_snapshot n;
> > struct wakeup_source *ws;
> > + pid_t task_pid;
> > + int id;
> > +
> > + task_pid = task_pid_nr(current);
> >
> > if (!epi->ep->ws) {
> > - epi->ep->ws = wakeup_source_register(NULL, "eventpoll");
> > + id = atomic_inc_return(&wakesource_create_id);
> > + epi->ep->ws = wakeup_source_register(NULL, "epoll:%d:%d", id, task_pid);
>
> How often does this execute? Is it at most once per task lifespan?
Thank you for your feedback! This can execute multiple times throughout
a task's lifespan. However, I haven't seen it execute that often.
> The var probably wants to be annotated with ____cacheline_aligned_in_smp
> so that it does not accidentally mess with other stuff.
>
> I am assuming there is no constant traffic on it.
Right, I don't see much traffic on it. Can you please elaborate a bit
more on what interaction you're concerned with here? If it's a
concern about false sharing, I'm worried that we may be prematurely
optimizing this.
--Isaac
next prev parent reply other threads:[~2024-07-03 21:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 17:28 [PATCH v5] fs: Improve eventpoll logging to stop indicting timerfd Isaac J. Manjarres
2024-06-24 17:36 ` Isaac Manjarres
2024-06-24 18:03 ` John Stultz
2024-06-25 17:43 ` Isaac Manjarres
2024-06-25 17:58 ` Mateusz Guzik
2024-07-03 21:37 ` Isaac Manjarres [this message]
2024-07-04 12:44 ` Mateusz Guzik
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=ZoXEiCvdNRr_tj2N@google.com \
--to=isaacmanjarres@google.com \
--cc=brauner@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jack@suse.cz \
--cc=kernel-team@android.com \
--cc=krossmo@google.com \
--cc=len.brown@intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mjguzik@gmail.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=saravanak@google.com \
--cc=tglx@linutronix.de \
--cc=varmam@google.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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