Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp724939pxb; Wed, 8 Sep 2021 10:48:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5qHaZwqbSdukzjqbK/OFQIgCTlxCBamrIZwVWcJOrrjjxK0Au2wqoHuY0rBiVk7EH5Nuf X-Received: by 2002:aa7:dd48:: with SMTP id o8mr5046180edw.44.1631123289687; Wed, 08 Sep 2021 10:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631123289; cv=none; d=google.com; s=arc-20160816; b=iNg+htL3sT7t+/HS/1egU/0yjKpQ6mHQ1B6OaoElDKkLPGIIxUbBZJtqOOvtAqlXg+ vvoC2kdxe5uYPexFS/AhX2LoH6n7e4e9zSUJ528WvtLVDTs5k5Er3c0KfYbu77WELBHK HLTUyl1aOT/29rysU2D9FzN+uRbwvCzj7IzGMgPN4b+DZfm8YTvQqd4OxOYaf0kCMWXU sWXPlMFrR2tobDj5Oyz05dqjU8aeSj2ThPY/DIff8ny304YnAATmAgATllt0seopOVuH cfsUTTyR+zcbV3TDAHCxPJNDQlOwduRdUvZ200NFzJtRG9tAy7vg3lPsFZbNNLgmevS6 dSgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=AaZNkhJ9uju7jgrUs3IyzMfMXMTYOg+bSG//Hs7Zgbc=; b=RtGn7Uco/ZRCNldfZFqFLtNU5wFl0Tyfxg3gF+WNKhS19Rqx/jm6INCBjy0nBKmISD 8DmbAWPpjMP+ryKuI1cSn1c35LDLqEiKFNhQAPKbutqX7Jhec+wuUehh/Oq7JUBGQmtz HH4ImflhcBL+PL1J4AzoSHSSXv7xuYg6Gh3rgpnLV3I8LP4gpURkUHrVSJoY3YUxDe9g 46m8tO2qZ9SOy4xgGpdUcq0xFd9lzT/1LC7yoGfJWLwCsL6jIPJioPF16Y5VQyOFkEe6 j+J3c2DVpV51QAHczrMmnjkIvxMqgMp0LnmQaSpVImwlw36eQBh07JMFrPmQ5cysC5kd D9jQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jy19si2614318ejc.34.2021.09.08.10.47.40; Wed, 08 Sep 2021 10:48:09 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233514AbhIHQGZ convert rfc822-to-8bit (ORCPT + 99 others); Wed, 8 Sep 2021 12:06:25 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:60932 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbhIHQGZ (ORCPT ); Wed, 8 Sep 2021 12:06:25 -0400 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-193-6kt6kR_2ONqOOT2qFdPoMg-1; Wed, 08 Sep 2021 17:05:15 +0100 X-MC-Unique: 6kt6kR_2ONqOOT2qFdPoMg-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 8 Sep 2021 17:05:12 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.023; Wed, 8 Sep 2021 17:05:12 +0100 From: David Laight To: 'Wei Liu' CC: Linus Torvalds , Naresh Kamboju , Mathias Nyman , Johannes Berg , Jakub Kicinski , Shuah Khan , Brendan Higgins , Ariel Elior , "GR-everest-linux-l2@marvell.com" , "Linux ARM" , open list , Netdev , "lkft-triage@lists.linaro.org" , Arnd Bergmann , "David S. Miller" , Greg Kroah-Hartman , Nick Desaulniers , Nathan Chancellor , Daniel Borkmann , Alexei Starovoitov , Eric Dumazet Subject: RE: ipv4/tcp.c:4234:1: error: the frame size of 1152 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Thread-Topic: ipv4/tcp.c:4234:1: error: the frame size of 1152 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Thread-Index: AQHXpJjLHdBfxh/omUuYsxLT8U4Q1auaODzA///43ICAABV5QA== Date: Wed, 8 Sep 2021 16:05:12 +0000 Message-ID: References: <20210908100304.oknxj4v436sbg3nb@liuwe-devbox-debian-v2> <46be667d057f413aac7871ebe784e274@AcuMS.aculab.com> <20210908152351.asln63jxk43xffib@liuwe-devbox-debian-v2> In-Reply-To: <20210908152351.asln63jxk43xffib@liuwe-devbox-debian-v2> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Liu > Sent: 08 September 2021 16:24 > > On Wed, Sep 08, 2021 at 02:51:21PM +0000, David Laight wrote: > > From: Wei Liu > > > Sent: 08 September 2021 11:03 > > ... > > > However calling into the allocator from that IPI path seems very heavy > > > weight. I will discuss with fellow engineers on how to fix it properly. > > > > Isn't the IPI code something that is likely to get called > > when a lot of stack has already been used? > > > > So you really shouldn't be using much stack at all?? > > I don't follow your questions. I don't dispute there is a problem. I > just think calling into the allocator is not a good idea in that > particular piece of code we need to fix. > > Hopefully we can come up with a solution to remove need for a cpumask in > that code -- discussion is on-going. I'm pretty sure the IPI interrupt is high priority so can nest with another interrupt. (You certainly want it to be that way.) So the kernel may already be running on the interrupt stack. If the interrupted ISR code has used a lot of stack then there may not be as much left as you might expect. Many years ago (nearly 40!) I wrote something that did static stack depth analysis for an embedded system. Since there were no (interesting) indirect calls an no recursion it wasn't completely impossible. What it showed was that the deepest stack use was in error trace paths that probably never happened. I suspect the same is true for Linux - the deepest points will be inside printk() in obscure error paths. Get an IPI while in a printk() from deep inside an ISR and you may not have the amount of stack you expect. It might be possible to use the clang 'control flow integrity' information to determine the actual maximum stack use even for indirectly called functions. I suspect that would be an eye-opener.... David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)