lkml.org 
[lkml]   [2023]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: THP backed thread stacks
From
On 07.03.23 00:57, Mike Kravetz wrote:
> One of our product teams recently experienced 'memory bloat' in their
> environment. The application in this environment is the JVM which
> creates hundreds of threads. Threads are ultimately created via
> pthread_create which also creates the thread stacks. pthread attributes
> are modified so that stacks are 2MB in size. It just so happens that
> due to allocation patterns, all their stacks are at 2MB boundaries.

Is this also related to a recent change, where we try to always align at
PMD boundaries now, such that this gets more likely?

commit f35b5d7d676e59e401690b678cd3cfec5e785c23
Author: Rik van Riel <riel@surriel.com>
Date: Tue Aug 9 14:24:57 2022 -0400

mm: align larger anonymous mappings on THP boundaries


As a side note, I even heard of complains about memory bloat when
switching from 4k -> 64k page size with many threads ...

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2023-03-27 00:46    [W:0.126 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site