[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMmCJOJFMTuCXH3m@milan>
Date: Tue, 16 Sep 2025 17:28:36 +0200
From: Uladzislau Rezki <urezki@...il.com>
To: Michal Hocko <mhocko@...e.com>
Cc: "Uladzislau Rezki (Sony)" <urezki@...il.com>, linux-mm@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>,
Baoquan He <bhe@...hat.com>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 04/10] mm/vmalloc: Avoid cond_resched() when blocking
is not permitted
On Mon, Sep 15, 2025 at 07:11:27PM +0200, Michal Hocko wrote:
> On Mon 15-09-25 15:40:34, Uladzislau Rezki wrote:
> > vm_area_alloc_pages() contains the only voluntary reschedule points
> > along vmalloc() allocation path. They are needed to ensure forward
> > progress on PREEMPT_NONE kernels under contention for vmap metadata
> > (e.g. alloc_vmap_area()).
> >
> > However, yielding should only be done if the given GFP flags allow
> > blocking. This patch avoids calling cond_resched() when allocation
> > context is non-blocking(GFP_ATOMIC, GFP_NOWAIT).
>
> We do have cond_resched in the page allocator path, right?
> So unless I am missing something we can safely drope these. I thought we
> have discused this already.
>
Yes, we discussed this. I did some test with dropped cond_resched() for
!PREEMPT kernel and i can trigger soft-lockups under really heavy stress
load.
I prefer to keep them so far for consistency. I need some time to
investigate it more. As i noted in commit message, the vmalloc()
path only has those two resched points. Probably i need to move
them into another place later.
As for page-allocator, it is in a slow path which i do not hit in
my stress-setup.
--
Uladzislau Rezki
Powered by blists - more mailing lists