[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALvZod6WmFBj9NUWoNMMJywJ3VtoxMkMX8-T9E+m2tP2e7Gtqg@mail.gmail.com>
Date: Sun, 21 Nov 2021 19:42:07 -0800
From: Shakeel Butt <shakeelb@...gle.com>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: David Hildenbrand <david@...hat.com>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Yang Shi <shy828301@...il.com>, Zi Yan <ziy@...dia.com>,
Matthew Wilcox <willy@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: split thp synchronously on MADV_DONTNEED
On Sun, Nov 21, 2021 at 4:50 PM Kirill A. Shutemov <kirill@...temov.name> wrote:
>
[...]
>
> Have you considered impact on short-living tasks where paying splitting
> tax would hurt performace without any benefits? Maybe a sparete madvise
> opration needed? I donno.
>
Do you have a concrete example of such short-living applications doing
MADV_DONTNEED? I can try to get some numbers to measure the impact.
Regarding the new advice option, I did give some thought to it but
decided against it based on the reason that we should not be exposing
some low level kernel implementation detail to users through a stable
API.
[...]
> > diff --git a/include/linux/sched.h b/include/linux/sched.h
> > index 9d27fd0ce5df..a984bb6509d9 100644
> > --- a/include/linux/sched.h
> > +++ b/include/linux/sched.h
> > @@ -1412,6 +1412,10 @@ struct task_struct {
> > struct mem_cgroup *active_memcg;
> > #endif
> >
> > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> > + struct list_head *deferred_split_list;
> > +#endif
> > +
> > #ifdef CONFIG_BLK_CGROUP
> > struct request_queue *throttle_queue;
> > #endif
>
> It looks dirty. We really don't have options to pass it down?
>
> Maybe passdown the list via zap_details and call a new rmap remove helper
> if the list is present?
>
We already have precedence on using this technique for other cases but
let me take a stab at passing the list through zap_details and see how
that looks.
> >
> > +void split_local_deferred_list(struct list_head *defer_list)
[...]
> Looks like a lot of copy-paste from deferred_split_scan(). Can we get them
> consolidated?
I will see what I can do.
Thanks for the review.
Shakeel
Powered by blists - more mailing lists