Re: [PATCH] mm, memcg: Add memory.transparent_hugepage_disabled

From: Michal Hocko
Date: Tue Mar 24 2020 - 09:32:28 EST


On Tue 24-03-20 20:30:32, teawater wrote:
>
>
> > 2020å3æ24æ 19:00ïMichal Hocko <mhocko@xxxxxxxxxx> åéï
> >
> > On Tue 24-03-20 18:31:56, Hui Zhu wrote:
> >> /sys/kernel/mm/transparent_hugepage/enabled is the only interface to
> >> control if the application can use THP in system level.
> >> Sometime, we would not want an application use THP even if
> >> transparent_hugepage/enabled is set to "always" or "madvise" because
> >> thp may need more cpu and memory resources in some cases.
> >
> > Could you specify that sometime by a real usecase in the memcg context
> > please?
>
>
> Thanks for your review.
>
> We use thp+balloon to supply more memory flexibility for vm.
> https://lore.kernel.org/linux-mm/1584893097-12317-1-git-send-email-teawater@xxxxxxxxx/
> This is another thread that I am working around thp+balloon.
>
> Other applications are already deployed on these machines. The
> transparent_hugepage/enabled is set to never because they used to have
> a lot of THP related performance issues. And some of them may call
> madvise thp with itself.

If they call madvise then they clearly indicate they prefer THP
regardless the cost. So I really fail to see what memcg specific tuning
brings in.

Could you be more specific about the usecase that cannot work with the
existing THP tuning?
--
Michal Hocko
SUSE Labs