All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Nikolay Borisov <kernel@kyup.com>,
	Christoph Lameter <cl@linux.com>, Linux MM <linux-mm@kvack.org>,
	brouer@redhat.com
Subject: Re: Soft lockup in __slab_free (SLUB)
Date: Wed, 28 Sep 2016 19:47:05 -0700	[thread overview]
Message-ID: <20160929024705.GK14933@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160929123007.436e30d0@roar.ozlabs.ibm.com>

On Thu, Sep 29, 2016 at 12:30:07PM +1000, Nicholas Piggin wrote:
> On Wed, 28 Sep 2016 19:11:00 -0700
> "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
> > On Thu, Sep 29, 2016 at 10:40:24AM +0900, Joonsoo Kim wrote:
> > > On Wed, Sep 28, 2016 at 10:15:01AM +0300, Nikolay Borisov wrote:  
> > > > 
> > > > I don't think it's an RCU problem per-se since ext4_i_callback is being
> > > > called from RCU due to the way inodes are being freed.  
> > > 
> > > That doesn't mean that RCU has no problem. IIUC, the fact is that RCU
> > > has no scheduling point in rcu_process_callbacks() and it would be
> > > problematic. It just depends on workload.  
> > 
> > You mean rcu_do_batch()?  It does limit the callbacks invoked per call
> > to rcu_do_batch() under normal conditions, see the "++count >= bl" check.
> > 
> > Now, if you dump a huge number of callbacks down call_rcu()'s throat,
> > it will stop being Mr. Nice Guy and will start executing the callbacks
> > as fast as it can for potentially quite some time.  But a huge number
> > will be in the millions.  Per CPU.  In which case I just might have a
> > few questions about exactly what you are trying to do.
> > 
> > Nevertheless, it is entirely possible that RCU's callback-invocation
> > throttling strategy needs improvement.
> 
> Would it be useful to have a call_rcu variant that may sleep. Callers would
> use it preferentially if they can. Implementation might be exactly the same
> for now, but it would give you more flexibility with throttling strategies
> in future.

You can specify callback-offloading at build and boot time, which will have
each CPU's callbacks being processed by a kernel thread:

CONFIG_RCU_NOCB_CPU
CONFIG_RCU_NOCB_CPU_{NONE,ZERO,ALL}
rcu_nocbs=

However, this still executes the individual callbacks with bh disabled.
If you want the actual callbacks themselves to be able to sleep, make
the callback hand off to a workqueue, wake up a kthread, or some such.

But yes, if enough people were just having the RCU callback immediately
invoke a workqueue, that could easily be special cased, just as
kfree_rcu() is now.

Or am I missing your point?

							Thanx, Paul

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-09-29  2:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26  7:46 Soft lockup in __slab_free (SLUB) Nikolay Borisov
2016-09-28  5:31 ` Joonsoo Kim
2016-09-28  7:15   ` Nikolay Borisov
2016-09-28 11:12     ` Paul E. McKenney
2016-09-29  1:40     ` Joonsoo Kim
2016-09-29  2:11       ` Paul E. McKenney
2016-09-29  2:30         ` Nicholas Piggin
2016-09-29  2:47           ` Paul E. McKenney [this message]
2016-09-29  3:13             ` Nicholas Piggin
2016-09-29 10:30               ` Paul E. McKenney
2016-09-29  2:55         ` Joonsoo Kim
2016-09-29  7:11           ` Nikolay Borisov
2016-09-29 10:27             ` Paul E. McKenney
2016-09-29 10:50               ` Nikolay Borisov
2016-09-29 11:10                 ` Paul E. McKenney
2016-10-04 14:58   ` Nikolay Borisov
2016-10-04 15:36     ` Paul E. McKenney

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=20160929024705.GK14933@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=brouer@redhat.com \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kernel@kyup.com \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.