Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp364816ybt; Sat, 13 Jun 2020 07:00:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiF2aLddeZVz/VV255xU/7BbqXSnvHSiVIqCOMmRV5M1Gn60s/wKxYToflQhT8XNmAzUth X-Received: by 2002:a17:906:95c2:: with SMTP id n2mr17000845ejy.339.1592056804514; Sat, 13 Jun 2020 07:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592056804; cv=none; d=google.com; s=arc-20160816; b=sAGgB0nL/gZx3gAsFHupgBQuCfwoeDdzVll42eQrjZroL/8DYpgKxM0S9vHBMvKCkB dT5z4UdnSxYUJExYQubBYF6EDDf3sSyBNfHVD4AZ/OYKFY18dTxwdcKM1cZ4lLs2aCcX 3LABpek5RD69XJ4k2GG+RGN+jUqf+jvCEzYnVLAID3bsa9vQNcIwiAxlBgrQ3PM1ZBGI 0Oj4pO/4N/JeD10OmbVPJxsFDjP/jTsjRCRKlVKyZyQ6BGPPrrKyHO3xyztl0id0HB+w LWkM4m/OUz7M3oLFOA0rlhjFbaxHEOjWVOjAg5SE41liEtmTwY12RUucxgkvU+fvFS1s x1sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=P46+vTDp7JYJov+F0libzNKgpY7HwAGkSOwN20KITY4=; b=tmpCWAt91hqsMtdzR9MNCCsi6qQlWrRD2ubUIWg8O2jemk/YZhMUUT27a4rKjjEG/v JG2rLaL5ZaiN6v8JwLGNHhuZYEqXPWpI5Y2Wvf07EWjqk7UjqVU3js+lBG3eZ6otb4fz 8z7OKN5npYcBGOp74oquRbZEBxil8GDzAbnRI1lmwW8RAKrsSDSbMgHiak1qwM4RctV2 zm0ImHOQ+tHfM/bCXQCer1brkYDngE/Vgs2tktYvG0jqtaNG+FzJh8sbQ76tY4JKStcc 5CWlIUfgmuedW+d7xpQ+iy0KXUtP7rBdMyw1/GfPbgKoZNMsyuRgrE0ETUghGLSiWC+M i9CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=kWTF9IXH; 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 dd12si5889145ejb.59.2020.06.13.06.59.41; Sat, 13 Jun 2020 07:00:04 -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; dkim=pass header.i=@lca.pw header.s=google header.b=kWTF9IXH; 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 S1726323AbgFMNz7 (ORCPT + 99 others); Sat, 13 Jun 2020 09:55:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726102AbgFMNz6 (ORCPT ); Sat, 13 Jun 2020 09:55:58 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41EA5C03E96F for ; Sat, 13 Jun 2020 06:55:57 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id f18so11756589qkh.1 for ; Sat, 13 Jun 2020 06:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=P46+vTDp7JYJov+F0libzNKgpY7HwAGkSOwN20KITY4=; b=kWTF9IXHl0Z+7CBmQeyaW2OZ0rrrei+4ArMWmRFP+JD5h/y7mpiV+cj6SK6qdapzJq daCpJzcYLixOygK0f8hcTVw0kb/U2eoEDKWghkSUs5ywmVpd5Zj60n1xzwfFrH33kJ99 7iiVQ8GXNEUdbs1bKAlLP/kjxczunrye4ZlmpBgJHJ2mR/oFePgqAZS1y9BTO+PGha4a 40V12/03K4d1PgOzNmZP7kqaVryhUcZn1GMNGZkJqws1f9txqXMyKQusPCvAh4bjltHo i2ZsmDK0vzPnO2ZKpF3pUNfSAk4HMtxFJ2hr3bJf3F2AqGYVxcRUqDz9BpftNZOi1VG2 X9ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=P46+vTDp7JYJov+F0libzNKgpY7HwAGkSOwN20KITY4=; b=LzX+qJpiU4OPtCzXqgQvxpABTyfFiQD6X1ZMuCu6NwTYoa64PRjGA3g+auejnAFMH7 Vik1tU+9R2lBj56Y78r1r142f4fWbbUYPPMJN5utxJ39cgVDzAqWnhZK60ztl2QrmfrX fjbaxhwnhAEyfbuxDydonT4o5ta8TONHRQGNReQiSe2Bd0le5uEnfAqcEG0ZJmZu81Eg 8ZyJcSbhNgEQif4OvA00yo92EyVmQZGnTEt7b9aYEPBxy/pciehzCcxUjQWbWrQIlwiO 1RSLCmWiGirjPLicnwWDq8AX0zI4owd7ezPMN+xQrnDMIZNzW+pzMLxrNiPUXBWzePdR Lmfw== X-Gm-Message-State: AOAM530ikDMricsMWdEQ/++WTHzGlG/AhmdqCYNk2lyeSltZlu/ZmtNY FrxrTc1BgfIv7NkEj1GfzH5xOw== X-Received: by 2002:a37:813:: with SMTP id 19mr7396684qki.362.1592056556288; Sat, 13 Jun 2020 06:55:56 -0700 (PDT) Received: from lca.pw (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id c58sm7787498qtd.27.2020.06.13.06.55.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 06:55:55 -0700 (PDT) Date: Sat, 13 Jun 2020 09:55:47 -0400 From: Qian Cai To: Thomas Gleixner 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 Message-ID: <20200613135547.GA992@lca.pw> References: <87zh9cnfmg.fsf@nanos.tec.linutronix.de> <87wo4gnetx.fsf@nanos.tec.linutronix.de> <20200610123833.GD954@lca.pw> <87h7vig17z.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h7vig17z.fsf@nanos.tec.linutronix.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 10, 2020 at 09:38:56PM +0200, Thomas Gleixner wrote: > 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. Thomas, I get ahold of one of the affected systems now if you want some testing there.