From: Jiri Olsa <jolsa@redhat.com>
To: Stephen Brennan <stephen.s.brennan@oracle.com>
Cc: linux-perf-users@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>
Subject: Re: Perf loses events without reporting
Date: Fri, 2 Jul 2021 22:12:48 +0200 [thread overview]
Message-ID: <YN9zQDghzBj8b4Ki@krava> (raw)
In-Reply-To: <YN89LwSzTKc8wBar@krava>
On Fri, Jul 02, 2021 at 06:22:10PM +0200, Jiri Olsa wrote:
> On Thu, Jul 01, 2021 at 11:00:24AM -0700, Stephen Brennan wrote:
>
> SNIP
>
> >
> > static ssize_t irqsoff_write(struct file *f, const char __user *data, size_t amt, loff_t *off)
> > {
> > char buf[32];
> > int rv;
> > unsigned long millis = 0;
> >
> > if (amt > sizeof(buf) - 1)
> > return -EFBIG;
> >
> > if ((rv = copy_from_user(buf, data, amt)) != 0)
> > return -EFAULT;
> >
> > buf[amt] = '\0';
> >
> > if (sscanf(buf, "%lu", &millis) != 1)
> > return -EINVAL;
> >
> > /* Threshold it at 5 minutes for safety. */
> > if (millis > 5 * 60 * 1000)
> > return -EINVAL;
> >
> > pr_info("[irqoff] lock for %lu millis\n", millis);
> > spin_lock_irq(&irqoff_lock);
> > irqsoff_inirq_delay(millis);
> > spin_unlock_irq(&irqoff_lock);
>
> yea, I can see that as well.. if I took the spin_lock_irq it works as
> expected.. will check
ok, so with disabling irqs you disable task tick which
kicks the unthrotling
throtling is started when you cross the limit of samples
per tick, which you do real fast with busy waiting
then when event is throttled (and no samples are generated),
the next task tick restores it.. but with disabled irqs,
there's no task tick, so the event is throttled all the
time when irqs are disabled
is there any use case you have to have irqs disabled for so long?
cc-ing peterz
initial email: https://lore.kernel.org/linux-perf-users/YN89LwSzTKc8wBar@krava/T/#m616481aa95da10e17d9b0769717f006b9ff38637
jirka
next prev parent reply other threads:[~2021-07-02 20:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 17:29 Perf loses events without reporting Stephen Brennan
2021-07-01 10:37 ` Jiri Olsa
2021-07-01 16:45 ` Stephen Brennan
2021-07-01 17:05 ` Stephen Brennan
2021-07-01 18:00 ` Stephen Brennan
2021-07-02 16:22 ` Jiri Olsa
2021-07-02 20:12 ` Jiri Olsa [this message]
2021-07-02 22:48 ` Stephen Brennan
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=YN9zQDghzBj8b4Ki@krava \
--to=jolsa@redhat.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=stephen.s.brennan@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).