From: Yin Fengwei <fengwei.yin@intel.com>
To: "Bae, Chang Seok" <chang.seok.bae@intel.com>,
Thomas Gleixner <tglx@linutronix.de>
Cc: "Sang, Oliver" <oliver.sang@intel.com>,
Borislav Petkov <bp@suse.de>, LKML <linux-kernel@vger.kernel.org>,
"lkp@lists.01.org" <lkp@lists.01.org>, lkp <lkp@intel.com>,
"Huang, Ying" <ying.huang@intel.com>,
"Tang, Feng" <feng.tang@intel.com>,
"zhengjun.xing@linux.intel.com" <zhengjun.xing@linux.intel.com>
Subject: Re: [x86/signal] 3aac3ebea0: will-it-scale.per_thread_ops -11.9% regression
Date: Wed, 8 Dec 2021 08:59:13 +0800 [thread overview]
Message-ID: <5bcb714f-371f-2f8d-cdf6-1736e3ae0aea@intel.com> (raw)
In-Reply-To: <9F5B9EA8-B876-487E-AD1C-87A791154F17@intel.com>
On 12/8/2021 6:17 AM, Bae, Chang Seok wrote:
> On Dec 7, 2021, at 12:36, Thomas Gleixner <tglx@linutronix.de> wrote:
>> On Tue, Dec 07 2021 at 18:49, Chang Seok Bae wrote:
>>> On Dec 7, 2021, at 05:38, Thomas Gleixner <tglx@linutronix.de> wrote:
>>>>
>>>> Does that use sigaltstack() ?
>>>
>>> FWIW, I was also wondering about this with:
>>>
>>> $ git clone https://github.com/antonblanchard/will-it-scale.git
>>> $ cd will-it-scale/
>>> $ git grep sigaltstack
>>> $
>>>
>>> But, the test seems to use python via runtest.py. And the python code has
>>> sigaltstack():
>>> https://github.com/python/cpython/blob/main/Modules/faulthandler.c#L454
>>
>> But how does that affect the test written in C? Mysterious!
>
> Indeed, I can only see the sigaltstack() trace via the python script.
>
> $ strace -f python3.7 ./runtest.py signal1 1>out 2>err
> $ grep -r sigaltstack err
> sigaltstack({ss_sp=0xe13f50, ss_flags=0, ss_size=16384}, {ss_sp=NULL,
> ss_flags=SS_DISABLE, ss_size=0}) = 0
> …
>
> $ strace -f ./signal1_processes 1>out 2>err
> $ grep -r sigaltstack err
> $ strace -f ./signal1_threads 1>out 2>err
> $ grep -r sigaltstack err
> $
Here is what I got:
From the strace output, we could see:
[pid 3171703] rt_sigreturn({mask=[]}) = 0
Code in kernel:
SYSCALL_DEFINE0(rt_sigreturn)
restore_altstack
do_sigaltstack
sigaltstack_lock
And this matches the perf callstack in the report:
0.00 +6.3 6.33 ± 8% perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock_irq.do_sigaltstack.restore_altstack.__x64_sys_rt_sigreturn
The rt_sigreturn was set as signal action restorer by libc during sigaction call. Thanks.
Regards
Yin, Fengwei
>
> I don’t get how this syscall could contribute 11% degradation in this test.
>
> BTW, the current code rejects the reported instruction here:
>
> $ python3.7 ./runtest.py signal1 295 thread 16
> Usage: runtest.py <testcase>
>
> Thanks,
> Chang
>
next prev parent reply other threads:[~2021-12-08 0:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 1:21 kernel test robot
2021-12-07 1:44 ` Oliver Sang
2021-12-07 13:38 ` Thomas Gleixner
2021-12-07 18:49 ` Bae, Chang Seok
2021-12-07 20:36 ` Thomas Gleixner
2021-12-07 22:17 ` Bae, Chang Seok
2021-12-08 0:59 ` Yin Fengwei [this message]
2021-12-09 2:30 ` [LKP] " Carel Si
2021-12-07 23:14 ` Dave Hansen
2021-12-08 18:00 ` Bae, Chang Seok
2021-12-08 18:20 ` Dave Hansen
2021-12-08 19:14 ` Thomas Gleixner
2021-12-09 8:13 ` Thomas Gleixner
2021-12-10 4:15 ` [LKP] " Carel Si
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=5bcb714f-371f-2f8d-cdf6-1736e3ae0aea@intel.com \
--to=fengwei.yin@intel.com \
--cc=bp@suse.de \
--cc=chang.seok.bae@intel.com \
--cc=feng.tang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=lkp@lists.01.org \
--cc=oliver.sang@intel.com \
--cc=tglx@linutronix.de \
--cc=ying.huang@intel.com \
--cc=zhengjun.xing@linux.intel.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
all inboxes | Powered by JetHome®