Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp431959ybi; Fri, 21 Jun 2019 02:05:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAyZdQfjDbiY2QCkgjqU5n13LviyMj4ZCUU0LNO4nbwaJfKaeRHYCNoWxlZ4SWL3vup4Ju X-Received: by 2002:a65:56c2:: with SMTP id w2mr17607170pgs.49.1561107952675; Fri, 21 Jun 2019 02:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561107952; cv=none; d=google.com; s=arc-20160816; b=egMR10VGe/hPQgYIGos5LJA9BPN0wee/1OONNkp2vroORQtN/1HoTgOjJZ8V6hsGuV 6H082Khl8PCBzaXyQylw314K8h6P2PLfRAUXDusJjsaZIepmk3f9u+LDIrPtmxeMptIA p+RAZWa9udVL86Y1C4CtE8m2EwLWE82TWHIoJtmpQf9rg0H8vhoilNFJOkIxwbKk5SU1 Ym/luhn67EWXhvqJYrhZ8WezmclH4JfV6ekLLFxYT5dLbBlvphDxa+2Ni5+7BlE6U7WB qNFyl8P7nWadnfFZ5TFky0YMTtjdt4zEAeQEPthmbf0RWFxoWf0LxuGunbG+fUr+E+Di FOew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=Rkv6dR4XChzJp8kYVDvffLCfz79gLMFodiv/FkuPCHo=; b=e4smrKLCnaskj4zGfJPSaS7urtY6HFpImeu9LndJvzQMFY5104pz2maApJfuq2i8n9 LPuZ8hgVsaQNKpTrq9oS8N5xQcFzxW/HWsFSgxqDUxiwyxdN7iZQQnd2p1zti8Z+LUTk U8vo9hKqOM+hz39d222z6YRo5ELcZiXrHZyD9IC7UBSwU9kQ0NDQFlGKstB+owSYSfYx vKoTPsoqQd3NXJKGZ7kbepEblMht9X/jqi9bkS0GS3OAggVwnRNfJZ/dww8QCS1YCYPa VZGVM2uN7sMA8dTSuGoEjda45HlfvZIBJYgAedLXZsXSsnuRwjXepB5vW7ggX0h3yp0N xQkQ== 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 x8si2047901pfa.186.2019.06.21.02.05.37; Fri, 21 Jun 2019 02:05:52 -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; 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 S1726360AbfFUJFc (ORCPT + 99 others); Fri, 21 Jun 2019 05:05:32 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:36236 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbfFUJFb (ORCPT ); Fri, 21 Jun 2019 05:05:31 -0400 Received: by mail-qt1-f196.google.com with SMTP id p15so6180380qtl.3; Fri, 21 Jun 2019 02:05:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Rkv6dR4XChzJp8kYVDvffLCfz79gLMFodiv/FkuPCHo=; b=ccVbStD9tyO3+C1twcHrXk0egE6qV2DMij8IdX96NNcaZcILA96aqPrYXjugNJSh5O ovEBYhv35cfGEV34rcWO08eor7iAKVKkrg2Er74B3jCzrTMckz/bx2YHmX1HUpwLPYfJ eIy2+ZBzHhMGsvIJ6qY9oyFUyLYgUixJcSiV/j8b/J8o7xMEoB1iRvXmcqb/bgH8LXNZ JWvvyHI5CoCKO5eI9xezyBeVxz5actzXVpUJJMED2ERdh9eLXs5sYVGxTa3kw2YnmNaP O2VteMpejKWwhQTRumbmYwHXDbdRpJBa0NcNHsFqYOgGOIxidGX6LaD9zrM+jKS+huku pBhA== X-Gm-Message-State: APjAAAWyHirpTmzAORzvm26fB1iv9+uOJESG3oSweWXETV+seiwMFm3e PeXtdHUm1UqsJkHqTacBCykJ3YtCH8BA51whsaE= X-Received: by 2002:aed:33a4:: with SMTP id v33mr81359991qtd.18.1561107930740; Fri, 21 Jun 2019 02:05:30 -0700 (PDT) MIME-Version: 1.0 References: <20190617131733.2429469-1-arnd@arndb.de> In-Reply-To: From: Arnd Bergmann Date: Fri, 21 Jun 2019 11:05:11 +0200 Message-ID: Subject: Re: [PATCH] dmaengine: dw-edma: fix unnecessary stack usage To: Gustavo Pimentel Cc: Vinod Koul , Dan Williams , Andy Shevchenko , Russell King , Joao Pinto , "dmaengine@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 21, 2019 at 10:21 AM Gustavo Pimentel wrote: > On Mon, Jun 17, 2019 at 14:16:45, Arnd Bergmann wrote: > > > Putting large constant data on the stack causes unnecessary overhead > > and stack usage: > > > > drivers/dma/dw-edma/dw-edma-v0-debugfs.c:285:6: error: stack frame size of 1376 bytes in function 'dw_edma_v0_debugfs_on' [-Werror,-Wframe-larger-than=] > > I had that warning at the beginning of the development, that's why I > divided the debugfs entries into several subfunctions. Perhaps my > configuration has configured a bigger stack frame size than your > configuration. I suspect the problem is CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE, which is a farily new configuration option that has the unintended side-effect of sometimes preventing the compiler combining local variables from functions inlined into the caller. Adding 'noinline_for_stack' to the sub-functions would have also prevented this, but I think just not having the strings on the stack is better anyway. Arnd