Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp773133ybg; Wed, 10 Jun 2020 13:20:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfBE+lRMdLMtu/cB7mPuKFKDq0e9rjRvU5R8ej3XxYXSj5Qpr2hpwfxstFRoEc/j2o/tM1 X-Received: by 2002:a17:906:c187:: with SMTP id g7mr5097671ejz.446.1591820447442; Wed, 10 Jun 2020 13:20:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591820447; cv=none; d=google.com; s=arc-20160816; b=Hnjc+Zus9g3yXVB7Z14wlKbQqCrppWwIYW4zHeFeI+s0R6Ye4owC49BqFS9yba2Bps hWNRnVWzNK3RgC+CzdaOyhxsALirSz5n7zK2HYTcsA25C301WJeuxeP1UIjYbCFVnnTv ORQFOVQQXHPfaqhF+bXMNyA3SWPT84STMkd0MVa1O5OWu3eqtPh9y+uJFgxoq/hipN33 WQLN7pxIIeXWxEwhXEsHtMwBv1ijZmesHXhsE45Memk3yFrKvqF4t13q9uN5XiAYsjee Y0WPjWmPid0u/RCzL8qmdY4cczTv7j8Rk8wq6xVvttDUKMaJtEG+iiOXWl1Gock5OZX4 qOZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=2eNiECIctu7r82Uoa30SNZC8b+6g3o9ylBwQpY33b/4=; b=ON983UejMVXCKI7GDUk3ihXf9YX2vcBStObFAl3JGJ84JMLml8iOhgrxj0Mx4B7dyN edpOWE++LfhYVxpZJqjG4DUZbkNtWp9V5TmB9+9MLJjeDAVYobjuhqe052ezGzp0xMiV OH/OQ1y+nEOBZwpjf+SZVshnwrAhJGRYDiwVE8KO8rQ/6bFDbl+f9FosW8HSsMsleXAr o3o3mb+eemw58+6cGnJRDMZ+fTYwAY+lFaUcXsB+VRCIFP4UClAX38QZuL+k8Dc8fgjQ WNLcZe45RO1uj8rA8hrW2Da0N/ILS5pdtntJvK47g+OqIn2JdJhtLUu25TIK5x9pPQgv 9AMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di14si356072edb.559.2020.06.10.13.20.24; Wed, 10 Jun 2020 13:20:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730282AbgFJTjg (ORCPT + 99 others); Wed, 10 Jun 2020 15:39:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730240AbgFJTjf (ORCPT ); Wed, 10 Jun 2020 15:39:35 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A64F8C03E96B for ; Wed, 10 Jun 2020 12:39:35 -0700 (PDT) Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jj6Yq-0002IN-V7; Wed, 10 Jun 2020 21:38:57 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 5506C1013D0; Wed, 10 Jun 2020 21:38:56 +0200 (CEST) From: Thomas Gleixner To: Qian Cai Cc: Peter Zijlstra , LKML , Andy Lutomirski , Andrew Cooper , X86 ML , "Paul E. McKenney" , Alexandre Chartre , Frederic Weisbecker , Paolo Bonzini , Sean Christopherson , Masami Hiramatsu , Petr Mladek , Steven Rostedt , Joel Fernandes , Boris Ostrovsky , Juergen Gross , Brian Gerst , Mathieu Desnoyers , Josh Poimboeuf , Will Deacon , Tom Lendacky , Wei Liu , Michael Kelley , Jason Chen CJ , Zhao Yakui , Alexander Potapenko Subject: Re: [patch V9 10/39] x86/entry: Provide helpers for execute on irqstack In-Reply-To: <20200610123833.GD954@lca.pw> References: <87zh9cnfmg.fsf@nanos.tec.linutronix.de> <87wo4gnetx.fsf@nanos.tec.linutronix.de> <20200610123833.GD954@lca.pw> Date: Wed, 10 Jun 2020 21:38:56 +0200 Message-ID: <87h7vig17z.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Qian Cai writes: > On Tue, Jun 09, 2020 at 10:50:50PM +0200, Thomas Gleixner wrote: >> Thomas Gleixner writes: >> >> BAD (after oom02) >> >> # cat /sys/kernel/debug/stackdepot/info >> >> Unique stacks: 140476 >> > >> > That's indeed odd. I try to reproduce and figure out what really breaks >> > here. >> >> I checked your config file and I think I know where this comes from. Can >> you plase disable KASAN just for testing purposes and compare before >> after again? > > It turns out I'll need a few days to be able to get ahold of those > affected systems again. I'll be reporting back as soon as possible. I figured it out. It has nothing to do with asm_call_on...(). It's also unrelated to page_owner. It's purely a KASAN issue. KASAN trims stack traces with the help of filter_irq_stacks() which relies on __irqentry_text_start/end The entry rework moved the interrupt entry points out of the irqentry section, which breaks that filter function. I made it work again. Here are the numbers which make that obvious: Mainline: Unique stacks: 23403 Depot index: 244 Depot offset: 4208 x86/entry: Unique stacks: 38835 Depot index: 464 Depot offset: 7616 x86/entry + fix: Unique stacks: 23607 Depot index: 247 Depot offset: 14224 So with the non-working trimming this generates more unique stacks and because they are not trimmed they become larger and eat more storage space. The resulting average per stack shows that: Mainline: 171 bytes per stack x86/entry: 195 bytes per stack x86/entry + fix: 172 bytes per stack I'll point you to a test branch shortly. Thanks, tglx