public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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: Thu, 09 Dec 2021 09:13:18 +0100	[thread overview]
Message-ID: <87v8zyyz4x.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?

Yes, right before the sigaltstack_lock() invocation.

Thanks,

        tglx

  parent reply	other threads:[~2021-12-09  8:13 UTC|newest]

Thread overview: 14+ 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: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
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 [this message]
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=87v8zyyz4x.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=bp@suse.de \
    --cc=chang.seok.bae@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=feng.tang@intel.com \
    --cc=fengwei.yin@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=oliver.sang@intel.com \
    --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