lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f949f712-eacf-49a0-91ea-8062e2d1f5e0@zytor.com>
Date: Tue, 12 Mar 2024 14:36:27 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Pasha Tatashin <pasha.tatashin@...een.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        akpm@...ux-foundation.org, x86@...nel.org, bp@...en8.de,
        brauner@...nel.org, bristot@...hat.com, bsegall@...gle.com,
        dave.hansen@...ux.intel.com, dianders@...omium.org,
        dietmar.eggemann@....com, eric.devolder@...cle.com, hca@...ux.ibm.com,
        hch@...radead.org, jacob.jun.pan@...ux.intel.com, jgg@...pe.ca,
        jpoimboe@...nel.org, jroedel@...e.de, juri.lelli@...hat.com,
        kent.overstreet@...ux.dev, kinseyho@...gle.com,
        kirill.shutemov@...ux.intel.com, lstoakes@...il.com, luto@...nel.org,
        mgorman@...e.de, mic@...ikod.net, michael.christie@...cle.com,
        mingo@...hat.com, mjguzik@...il.com, mst@...hat.com, npiggin@...il.com,
        peterz@...radead.org, pmladek@...e.com, rick.p.edgecombe@...el.com,
        rostedt@...dmis.org, surenb@...gle.com, tglx@...utronix.de,
        urezki@...il.com, vincent.guittot@...aro.org, vschneid@...hat.com
Subject: Re: [RFC 00/14] Dynamic Kernel Stacks

On 3/12/24 12:45, Pasha Tatashin wrote:
>>
>> Ok, first of all, talking about "kernel memory" here is misleading.
> 
> Hi Peter,
> 
> I re-read my cover letter, and I do not see where "kernel memory" is
> mentioned. We are talking about kernel stacks overhead that is
> proportional to the user workload, as every active thread has an
> associated kernel stack. The idea is to save memory by not
> pre-allocating all pages of kernel-stacks, but instead use it as a
> safeguard when a stack actually becomes deep. Come-up with a solution
> that can handle rare deeper stacks only when needed. This could be
> done through faulting on the supported hardware (as proposed in this
> series), or via pre-map on every schedule event, and checking the
> access when thread goes off cpu (as proposed by Andy Lutomirski to
> avoid double faults on x86) .
> 
> In other words, this feature is only about one very specific type of
> kernel memory that is not even directly mapped (the feature required
> vmapped stacks).
> 
>> Unless your threads are spending nearly all their time sleeping, the
>> threads will occupy stack and TLS memory in user space as well.
> 
> Can you please elaborate, what data is contained in the kernel stack
> when thread is in user space? My series requires thread_info not to be
> in the stack by depending on THREAD_INFO_IN_TASK.
> 

My point is that what matters is total memory use, not just memory used 
in the kernel. Amdahl's law.

	-hpa


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ