lkml.org 
[lkml]   [2020]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC-PATCH 2/4] mm: Add __rcu_alloc_page_lockless() func.
On Thu, Sep 24, 2020 at 01:16:32PM +0200, Peter Zijlstra wrote:
> On Thu, Sep 24, 2020 at 10:16:14AM +0200, Uladzislau Rezki wrote:
> > Other option is if we had unconditionally enabled PREEMPT_COUNT config.
> > It would be easy to identify a context type and invoke a page allocator
> > if a context is preemtale. But as of now preemptable() is "half" working.
> > Thomas uploaded patches to make it unconditional. But it can be blocked.
>
> While I in principle support Thomas' patch, I think this is an abuse and
> still complete wrong.
>
Good that you support it :)

>
> Not all preemptible() context can deal with GFP_KERNEL (GFP_NOFS
> existing should be a clue). !preemptible context cannot unconditionally
> deal with GFP_NOWAIT, consider using it while holding zone->lock.
>
Not sure if i fully follow you here. What i tried to express, if we had
preemtable() fully working, including !PREEMPT, we can at least detect
the following:

if (!preemptable())
by pass using any ATOMIC/NOWAIT flags because they do not work;

as an example you mentioned z->lock that is sleepable.

>
> The preemption context does not say antying much useful about the
> allocation context.
>
I am talking about taking a decision.

--
Vlad Rezki

\
 
 \ /
  Last update: 2020-09-24 17:17    [W:0.310 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site