linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Dave Hansen <dave.hansen@intel.com>,
	linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	linux-mm@kvack.org, Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH 3/4] kernel/fork: switch vmapped stack callation to __vmalloc_area()
Date: Tue, 20 Feb 2018 16:16:34 -0800	[thread overview]
Message-ID: <20180220161634.517598ec63ec4a785c4c81cc@linux-foundation.org> (raw)
In-Reply-To: <5c19630f-7466-676d-dbbc-a5668c91cbcd@yandex-team.ru>

On Tue, 23 Jan 2018 16:57:21 +0300 Konstantin Khlebnikov <khlebnikov@yandex-team.ru> wrote:

> # stress-ng --clone 100 -t 10s --metrics-brief
> at 32-core machine shows boost 35000 -> 36000 bogo ops
> 
> Patch 4/4 is a kind of RFC.
> Actually per-cpu cache of preallocated stacks works faster than buddy allocator thus
> performance boots for it happens only at completely insane rate of clones.
> 

I'm not really sure what to make of this patchset.  Is it useful in any
known real-world use cases?

> +	  This option neutralize stack overflow protection but allows to
> +	  achieve best performance for syscalls fork() and clone().

That sounds problematic, but perhaps acceptable if the fallback only
happens rarely.

Can this code be folded into CONFIG_VMAP_STACk in some cleaner fashion?
We now have options for non-vmapped stacks, vmapped stacks and a mix
of both.

And what about this comment in arch/Kconfig:VMAP_STACK:

          This is presently incompatible with KASAN because KASAN expects
          the stack to map directly to the KASAN shadow map using a formula
          that is incorrect if the stack is in vmalloc space.


So VMAP_STACK_AS_FALLBACK will intermittently break KASAN?

  reply	other threads:[~2018-02-21  0:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23 10:55 [PATCH 1/4] vmalloc: add vm_flags argument to internal __vmalloc_node() Konstantin Khlebnikov
2018-01-23 10:55 ` [PATCH 2/4] vmalloc: add __vmalloc_area() Konstantin Khlebnikov
2018-01-23 10:55 ` [PATCH 3/4] kernel/fork: switch vmapped stack callation to __vmalloc_area() Konstantin Khlebnikov
2018-01-23 13:57   ` Konstantin Khlebnikov
2018-02-21  0:16     ` Andrew Morton [this message]
2018-02-21  7:23       ` Konstantin Khlebnikov
2018-02-21 16:35         ` Andy Lutomirski
2018-01-23 10:55 ` [PATCH 4/4] kernel/fork: add option to use virtually mapped stacks as fallback Konstantin Khlebnikov
2018-02-21 15:42   ` Use higher-order pages in vmalloc Matthew Wilcox
2018-02-21 16:11     ` Andy Lutomirski
2018-02-21 16:50       ` Matthew Wilcox
2018-02-21 16:16     ` Dave Hansen
2018-02-21 17:01       ` Matthew Wilcox
2018-02-22  6:59         ` Michal Hocko
2018-02-22 12:22           ` Matthew Wilcox
2018-02-22 13:36             ` Michal Hocko
2018-02-22 19:01               ` Andy Lutomirski
2018-02-22 19:19                 ` Dave Hansen
2018-02-22 19:27                   ` Andy Lutomirski
2018-02-22 19:36                     ` Dave Hansen
2018-02-23 12:13                 ` Michal Hocko
2018-03-01 18:16                   ` Eric Dumazet
2018-02-21 12:24 ` [PATCH 1/4] vmalloc: add vm_flags argument to internal __vmalloc_node() Matthew Wilcox
2018-02-21 12:39   ` Andrey Ryabinin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180220161634.517598ec63ec4a785c4c81cc@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=hch@infradead.org \
    --cc=khlebnikov@yandex-team.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).