lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 4 Oct 2022 14:05:01 -0400
From:   Joel Fernandes <joel@...lfernandes.org>
To:     Uladzislau Rezki <urezki@...il.com>
Cc:     paulmck@...nel.org, rcu@...r.kernel.org,
        linux-kernel@...r.kernel.org, rushikesh.s.kadam@...el.com,
        neeraj.iitr10@...il.com, frederic@...nel.org, rostedt@...dmis.org,
        youssefesmat@...gle.com, surenb@...gle.com
Subject: Re: [PATCH v7 02/11] rcu: Make call_rcu() lazy to save power

On Tue, Oct 4, 2022 at 7:41 AM Uladzislau Rezki <urezki@...il.com> wrote:
>
> >               trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("Check"));
> >               rcu_nocb_lock_irqsave(rdp, flags);
> >               lockdep_assert_held(&rdp->nocb_lock);
> >               bypass_ncbs = rcu_cblist_n_cbs(&rdp->nocb_bypass);
> > -             if (bypass_ncbs &&
> > +             lazy_ncbs = READ_ONCE(rdp->lazy_len);
> > +
> > +             if (bypass_ncbs && (lazy_ncbs == bypass_ncbs) &&
> > +                 (time_after(j, READ_ONCE(rdp->nocb_bypass_first) + jiffies_till_flush) ||
> > +                  bypass_ncbs > 2 * qhimark)) {
> Do you know why we want double "qhimark" threshold? It is not only this
> place, there are several. I am asking because it is not expected by the
> user.

I am following the qhimark conventions in existing code. However
qhimark does not mean that your callbacks cannot exceed these many or
something, it is not a hard limit on queued callbacks.

qhimark (And Paul can correct me) was introduced to reduce the number
of callbacks after which RCU will not limit execution of callbacks to
a batch of them. That has nothing to do with limiting the maximum
number of callbacks, per-se. However, its usage certainly seems to
have grown since that introduction.

Maybe you are confusing it with blimit:

#define DEFAULT_RCU_QHIMARK 10000 // If this many pending, ignore blimit.
static long qhimark = DEFAULT_RCU_QHIMARK;
#define DEFAULT_RCU_QLOMARK 100   // Once only this many pending, use blimit.
static long qlowmark = DEFAULT_RCU_QLOMARK;

thanks,

 - Joel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ