public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Wangnan (F)" <wangnan0@huawei.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: <linux-kernel@vger.kernel.org>, <pi3orama@163.com>
Subject: Re: [PATCH] perf core: Get rid of 'uses dynamic stack allocation' warning
Date: Fri, 22 Jan 2016 16:06:25 +0800	[thread overview]
Message-ID: <56A1E301.2080409@huawei.com> (raw)
In-Reply-To: <20160122080004.GN6357@twins.programming.kicks-ass.net>



On 2016/1/22 16:00, Peter Zijlstra wrote:
> On Fri, Jan 22, 2016 at 06:52:01AM +0000, Wang Nan wrote:
>> On s390 with CONFIG_WARN_DYNAMIC_STACK set, 'uses dynamic stack
>> allocation' warning is issued when defining 'struct perf_sample_data'
>> local variable.
>>
>> This patch suppress this warning by allocating extra 255 bytes and
>> compute aligned pointer manually.
> I've seen the warning and always wondered wtf it was about. This
> Changelog doesn't actually explain what the problem is, so I cannot
> judge the solution.
>
> That said, 255 extra bytes does sound excessive just to avoid a warn.

OK. Then I happly ignore it.

I also don't know the exact reason.  I guess it related
to the ____cacheline_aligned decorator after 'struct
perf_sample_data'. When allocating that structure on the
stack, kernel has to dynamically compute the stack size it
need to satisify the alignment constrain. My patch does
this work manually.

Thank you.

      reply	other threads:[~2016-01-22  8:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22  6:52 [PATCH] perf core: Get rid of 'uses dynamic stack allocation' warning Wang Nan
2016-01-22  7:06 ` kbuild test robot
2016-01-22  8:00 ` Peter Zijlstra
2016-01-22  8:06   ` Wangnan (F) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56A1E301.2080409@huawei.com \
    --to=wangnan0@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=pi3orama@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox