All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: lkp@lists.01.org
Subject: Re: [x86/signal] 3aac3ebea0: will-it-scale.per_thread_ops -11.9% regression
Date: Wed, 08 Dec 2021 20:14:38 +0100	[thread overview]
Message-ID: <874k7i29k1.ffs@tglx> (raw)
In-Reply-To: <c94b8394-08cd-8273-2cd5-1ee5880d4c36@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

On Wed, Dec 08 2021 at 10:20, Dave Hansen wrote:
> On 12/8/21 10:00 AM, Bae, Chang Seok wrote:
>> diff --git a/kernel/signal.c b/kernel/signal.c
>> index a629b11bf3e0..8194d2f38bf1 100644
>> --- a/kernel/signal.c
>> +++ b/kernel/signal.c
>> @@ -4224,6 +4224,11 @@ int restore_altstack(const stack_t __user *uss)
>>         stack_t new;
>>         if (copy_from_user(&new, uss, sizeof(stack_t)))
>>                 return -EFAULT;
>> +       if (current->sas_ss_sp == (unsigned long) new.ss_sp &&
>> +           current->sas_ss_size == new.ss_size &&
>> +           current->sas_ss_flags == new.ss_flags)
>> +               return 0;
>> +
>>         (void)do_sigaltstack(&new, NULL, current_user_stack_pointer(),
>>                              MINSIGSTKSZ);
>>         /* squash all but EFAULT for now */
>
> This seems like a generally good optimization that could go in
> do_sigaltstack() itself, no?
>
> Either way, it seems like 0day botched this a bit.  '3aac3ebea0' wasn't
> the actual culprit, it was the patch before.

The patch it pointed to was the one which enabled that config switch.

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Dave Hansen <dave.hansen@intel.com>,
	"Bae, Chang Seok" <chang.seok.bae@intel.com>
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>,
	"Yin, Fengwei" <fengwei.yin@intel.com>
Subject: Re: [x86/signal] 3aac3ebea0: will-it-scale.per_thread_ops -11.9% regression
Date: Wed, 08 Dec 2021 20:14:38 +0100	[thread overview]
Message-ID: <874k7i29k1.ffs@tglx> (raw)
In-Reply-To: <c94b8394-08cd-8273-2cd5-1ee5880d4c36@intel.com>

On Wed, Dec 08 2021 at 10:20, Dave Hansen wrote:
> On 12/8/21 10:00 AM, Bae, Chang Seok wrote:
>> diff --git a/kernel/signal.c b/kernel/signal.c
>> index a629b11bf3e0..8194d2f38bf1 100644
>> --- a/kernel/signal.c
>> +++ b/kernel/signal.c
>> @@ -4224,6 +4224,11 @@ int restore_altstack(const stack_t __user *uss)
>>         stack_t new;
>>         if (copy_from_user(&new, uss, sizeof(stack_t)))
>>                 return -EFAULT;
>> +       if (current->sas_ss_sp == (unsigned long) new.ss_sp &&
>> +           current->sas_ss_size == new.ss_size &&
>> +           current->sas_ss_flags == new.ss_flags)
>> +               return 0;
>> +
>>         (void)do_sigaltstack(&new, NULL, current_user_stack_pointer(),
>>                              MINSIGSTKSZ);
>>         /* squash all but EFAULT for now */
>
> This seems like a generally good optimization that could go in
> do_sigaltstack() itself, no?
>
> Either way, it seems like 0day botched this a bit.  '3aac3ebea0' wasn't
> the actual culprit, it was the patch before.

The patch it pointed to was the one which enabled that config switch.

  reply	other threads:[~2021-12-08 19:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07  1:21 [x86/signal] 3aac3ebea0: will-it-scale.per_thread_ops -11.9% regression kernel test robot
2021-12-07  1:21 ` kernel test robot
2021-12-07  1:44 ` Oliver Sang
2021-12-07  1:44   ` Oliver Sang
2021-12-07 13:38 ` Thomas Gleixner
2021-12-07 13:38   ` Thomas Gleixner
2021-12-07 18:49   ` Bae, Chang Seok
2021-12-07 18:49     ` Bae, Chang Seok
2021-12-07 20:36     ` Thomas Gleixner
2021-12-07 20:36       ` Thomas Gleixner
2021-12-07 22:17       ` Bae, Chang Seok
2021-12-07 22:17         ` Bae, Chang Seok
2021-12-08  0:59         ` Yin Fengwei
2021-12-08  0:59           ` Yin Fengwei
2021-12-09  2:30   ` Carel Si
2021-12-09  2:30     ` [LKP] " Carel Si
2021-12-07 23:14 ` Dave Hansen
2021-12-07 23:14   ` Dave Hansen
2021-12-08 18:00   ` Bae, Chang Seok
2021-12-08 18:00     ` Bae, Chang Seok
2021-12-08 18:20     ` Dave Hansen
2021-12-08 18:20       ` Dave Hansen
2021-12-08 19:14       ` Thomas Gleixner [this message]
2021-12-08 19:14         ` Thomas Gleixner
2021-12-09  8:13       ` Thomas Gleixner
2021-12-09  8:13         ` Thomas Gleixner
2021-12-10  4:15   ` Carel Si
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=874k7i29k1.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=lkp@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.