Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2307534imd; Fri, 2 Nov 2018 09:11:10 -0700 (PDT) X-Google-Smtp-Source: AJdET5fjTuY202Bqs/rQnY0iPSzJV5z0qa1KQP2IZxyELuTr2KumySixGSAhGv6ZWGMeNx7tdGHh X-Received: by 2002:a65:60c9:: with SMTP id r9-v6mr11349562pgv.285.1541175070834; Fri, 02 Nov 2018 09:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541175070; cv=none; d=google.com; s=arc-20160816; b=v5xp8UJS/lak/WZh75eay70NLwghoL4PUg0qzYQ7kAbSZlIXNvPCIwvCSVqbkO45Ve 4iEdwqp5+0Ju2gDu/BEK8QVCi3FzsZrsc5b2S6vaWVcuVk75sthf+fMTW7ED2KYmN9E5 mnOpYQ+GCX1AnABJeYm8ecvr5ED08TArab6MWGPKxFWu0bQU1ZQ5NBmX87Mkrc2DIqgQ 6P3AMxJmB8KOoMNpQFGSl/q/C/EzCPAFMY1UNpRRS0APN3ZNc2weRtVz2WkuiklY+VVG 3NSUxo3INcB7WnvY43/8XmvypEzabwKE+7v4Z3AvolGjnUY79bIINeRxqKMEqRDLBow8 qsQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=toZ6GdabPKpTESOWXZ385LSkM52vFCYnsUVWju8J4s4=; b=HczJlT//zwe6tVjq3uRITOIH2s+a/obg7T/yz7UnOaPntf9X4pDXhYS6oKGEaljx0T C5FJaBNacCYyUCMQ8GOhdeXUMmrJNdrwtwH43kACrWJO2IkQt8zXTV6F/jvppeeT1mLB kkHxHTBmXyNvqxJAzEl4CVtk21A0lj39hDr0FxVkE5qI+A2sKgUFi5dd4AdnEw0X4DQ6 PaCLTlluQ+yRjt0wq16mWktGWsRowz3LOPXs78zMfNdHdgcj+N9Tq190CKYs0CNXkzuA cOrVM4lmdaMR9vsHRzz4Z075f+8by7kk182YNIdRWDGsnMF7ktVoMUClzdv2l0vwQySI +36w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=SbsZxntr; 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 r20-v6si34459854pgm.28.2018.11.02.09.10.56; Fri, 02 Nov 2018 09:11:10 -0700 (PDT) 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; dkim=pass header.i=@ziepe.ca header.s=google header.b=SbsZxntr; 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 S1728044AbeKCBQh (ORCPT + 99 others); Fri, 2 Nov 2018 21:16:37 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:43776 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726316AbeKCBQh (ORCPT ); Fri, 2 Nov 2018 21:16:37 -0400 Received: by mail-pl1-f193.google.com with SMTP id g59-v6so1212748plb.10 for ; Fri, 02 Nov 2018 09:09:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=toZ6GdabPKpTESOWXZ385LSkM52vFCYnsUVWju8J4s4=; b=SbsZxntrdWE2mWGUWeIpye7JnqUzKXrPt0C5+eCoLcdclGSkG/+pZqHiIWv3Y2wQiq Yt/zmzL2u4GRWykWyl8tBSQr2OoFbU2pOihqVG+W/csZeloC65zSI6MD/n7GfN0xUkG6 cc+2kkhQeHfJSBWdIBZEXbNkPkcJN3RYzi6xpPQiYA+nA0Tr0b26YBEEMkYJMlxERuAm 2dTZHRdrQpL0osNiZcIgT3wNBCg7LVDLKnr8lKREEkwesWLTwKDPEjURyJTEnyBepdtw 5NzDF57dFCZD1hNScvw274/G3Xndm/38NU+RSvTRcSijq2KhjRa0VcpeHovJyBuBMqNp buEQ== 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:content-transfer-encoding :in-reply-to:user-agent; bh=toZ6GdabPKpTESOWXZ385LSkM52vFCYnsUVWju8J4s4=; b=oguwUoNpbDuMGMe93ySFbUdRUOX35EZFG9rzWd9Q6dm3aXdnwyyKvXo+DUK8Z12NVv jfsEsbfb4FRMQ/XdVoH0C5K3xgc0QsPD0GbqI3q1vRQmfngedZxp3cdQ/naFgX2MxPG/ K4vDca10MVROVZEKoHUWRFS48/6w7Vhtuyei6JVG6QmtMLY0cDfcR5/iQVLX6DJeq1aA XUaxqGK45cbk2WL8yfnoIb6xDWFv3svzq5SyzyqdL4FXKGbfFc2nxUgBSQJ82/Zrbd8g VhEI5exUYrc/Hk4yDG4nlJ3A7LG/u76T/lbwonsTduwKFVUnCZGlJOBzngwmNF4hFwK4 7Eqg== X-Gm-Message-State: AGRZ1gKdJWqzXiP7V6Ea0GdwguieExnFXntT1zlQ6nGCN+exJiJ7HRhm +yGFo048Pnw178e2pWIMLxMhzIOhBYU= X-Received: by 2002:a17:902:187:: with SMTP id b7-v6mr12344982plb.150.1541174940925; Fri, 02 Nov 2018 09:09:00 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id y18-v6sm4667638pfa.136.2018.11.02.09.08.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Nov 2018 09:08:59 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1gIc0I-00055w-MW; Fri, 02 Nov 2018 10:08:58 -0600 Date: Fri, 2 Nov 2018 10:08:58 -0600 From: Jason Gunthorpe To: Arnd Bergmann Cc: Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Tariq Toukan , Eran Ben Elisha , Boris Pismenny , Ilya Lesokhin , Moshe Shemesh , Kamal Heib , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net/mlx5e: fix high stack usage Message-ID: <20181102160858.GA17096@ziepe.ca> References: <20181102153316.1492515-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181102153316.1492515-1-arnd@arndb.de> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 02, 2018 at 04:33:03PM +0100, Arnd Bergmann wrote: > A patch that looks harmless causes the stack usage of the mlx5e_grp_sw_update_stats() > function to drastically increase with x86 gcc-4.9 and higher (tested up to 8.1): > > drivers/net/ethernet/mellanox/mlx5/core/en_stats.c: In function ‘mlx5e_grp_sw_update_stats’: > drivers/net/ethernet/mellanox/mlx5/core/en_stats.c:216:1: warning: the frame size of 1276 bytes is larger than 500 bytes [-Wframe-larger-than=] Why is the stack size so big here? The mlx5e_sw_stats is < 500 bytes and all the other on-stack stuff looks pretty small? > By splitting out the loop body into a non-inlined function, the stack size goes > back down to under 500 bytes. Does this actually reduce the stack consumed or does this just suppress the warning? Jason