lkml.org 
[lkml]   [2020]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] rcu/tree: Drop the lock before entering to page allocator
On 2020-07-16 08:20:27 [-0700], Paul E. McKenney wrote:
> You lost me on this one. I am instead concerned that something like this
> might be needed on short notice:
>
> raw_spin_lock(&some_lock);
> kfree_rcu(some_pointer, some_field_offset);
>
> In contrast, single-argument kfree_rcu() cannot be invoked from any
> environment where synchronize_rcu() cannot be invoked.

I see. We don't have any kfree() in that context as far as I remember.
We had a few cases in "resize" where you allocate memory, copy content
and free old memory while under the lock but they are gone.

> > > Yes, dropping to a plain spinlock would be simple in the here and now,
> > > but experience indicates that it is only a matter of time, and that when
> > > that time comes it will come as an emergency.
> >
> > Hmmm.
>
> I point out the call_rcu() experience.
>
> > > One approach would be to replace the "IS_ENABLED(CONFIG_PREEMPT_RT)"
> > > with some sort of check for being in a context where spinlock acquisition
> > > is not legal. What could be done along those lines?
> >
> > I would rethink the whole concept how this is implemented now and give
> > it another try. The code does not look pretty and is looking
> > complicated. The RT covering of this part then just added a simple
> > return because nothing else seemed to be possible. This patch here
> > looks like another duct tape attempt to avoid a warning.
>
> In addition to the possibility of invocation from BH?

Invocation from BH should be possible because network would probably be
the first user. I don't remember anything wrong with BH if I remember
correctly.

> Thanx, Paul

Sebastian

\
 
 \ /
  Last update: 2020-07-16 17:37    [W:0.247 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site