Received: by 10.223.185.116 with SMTP id b49csp78832wrg; Tue, 20 Feb 2018 16:17:30 -0800 (PST) X-Google-Smtp-Source: AH8x227dowzn0fcSXNsRjSQ5HjkFl8gDymmShKTn3L0UU02pQNbhFiKlj2uLYK+loW/SJDWmHqdL X-Received: by 10.98.150.213 with SMTP id s82mr1396766pfk.10.1519172250416; Tue, 20 Feb 2018 16:17:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519172250; cv=none; d=google.com; s=arc-20160816; b=iTY+5zehfOXECz2u2tyd5BdZuCabt9ZqzGYEUBidm8bXqYPj4YFBMoYGct9m3O5FCV JqJthP6bcJQzuEmAieKEAknJttGrcwaTuGiPvWL5hqi/LaxArOkjidO2nBjIg7VNuCrp mkbAptMAvw5oaeUoMCnulC5DCMeXi9a19ZwW8RtAR2Cy1vd+wgI8KajMQzCljWd3stMF zdnUNccH1FnS1T3WhJm2lwE0TKVm3FemH6vBQBixyH3d4GnS86AQtP4lPPLzUIXtlNXW 3y9atHk1Vi6KM+yiKl9TUbihcBTdwrFVmIGIy6MhAeq+16V+r4WGe6xXx50mG3j8pg7v Js6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=cx9zWkS9ttBDxTD/U2HsTJ8w6qVssmUVzb4fK9PKA1U=; b=Yy+/4vMDyd76RaLLoaiZZwzV7B8d5IUG6NhhTKIC0qiLKiQQDFSXYVKJ7CQV0x4K+K YiDpsMOiP3GdqKtxzrhGep5trw9bnpH95wO26Ega+RZEvRjtJGjmh86bw+bt3bpT4ZR7 RL4p0RK331IiOh5AMn7Oh+mo+uwS2r9CVhcRvSTNK+08x91HL6wclYZgA1SmL3190ZQN EiudfRQMMgz2dw8/CaY5bCnuz/fvDPLKquYRs6B6313qRwiOF0ZCjeplugqgPcbRLnId MYDSC7sdzZzHvv5kKH80qBaLB+bVLI8GD/n3TPFaFM4giMYu3e2IKgu0+2GWCOf7sdCN T2hA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si5517441pga.810.2018.02.20.16.17.14; Tue, 20 Feb 2018 16:17:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751598AbeBUAQh (ORCPT + 99 others); Tue, 20 Feb 2018 19:16:37 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:34606 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751217AbeBUAQg (ORCPT ); Tue, 20 Feb 2018 19:16:36 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.71]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6A3B8DB9; Wed, 21 Feb 2018 00:16:35 +0000 (UTC) Date: Tue, 20 Feb 2018 16:16:34 -0800 From: Andrew Morton To: Konstantin Khlebnikov Cc: Dave Hansen , linux-kernel@vger.kernel.org, Christoph Hellwig , linux-mm@kvack.org, Andy Lutomirski Subject: Re: [PATCH 3/4] kernel/fork: switch vmapped stack callation to __vmalloc_area() Message-Id: <20180220161634.517598ec63ec4a785c4c81cc@linux-foundation.org> In-Reply-To: <5c19630f-7466-676d-dbbc-a5668c91cbcd@yandex-team.ru> References: <151670492223.658225.4605377710524021456.stgit@buzz> <151670492913.658225.2758351129158778856.stgit@buzz> <5c19630f-7466-676d-dbbc-a5668c91cbcd@yandex-team.ru> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 Jan 2018 16:57:21 +0300 Konstantin Khlebnikov 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?