All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gaurav Kohli <gkohli@codeaurora.org>
To: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, maz@kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	neeraju@codeaurora.org
Subject: Re: [PATCH] arm64: Skip apply SSBS call for non SSBS system
Date: Wed, 12 Aug 2020 19:45:12 +0530	[thread overview]
Message-ID: <5b1ad0e0-bbe7-9869-ee19-1b62023203ed@codeaurora.org> (raw)
In-Reply-To: <20200812133043.GA8924@willie-the-truck>



On 8/12/2020 7:00 PM, Will Deacon wrote:
> On Tue, Aug 04, 2020 at 07:44:42PM +0530, Gaurav Kohli wrote:
>> In a system where no cpu's implement SSBS, for
>> them no need to set pstate. This might help to save
>> few cpu cycles during context switch.
>>
>> Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
>>
>> diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
>> index 6089638..79f80f1 100644
>> --- a/arch/arm64/kernel/process.c
>> +++ b/arch/arm64/kernel/process.c
>> @@ -477,6 +477,13 @@ static void ssbs_thread_switch(struct task_struct *next)
>>   	struct pt_regs *regs = task_pt_regs(next);
>>   
>>   	/*
>> +	 * For Targets which don't have SSBS support, they
>> +	 * can return from here.
>> +	 */
>> +	if (!IS_ENABLED(CONFIG_ARM64_SSBD))
>> +		return;
> 
> Does this actually make a measurable difference?
> 
> Will
> 

Hi Will,

While doing code review between older kernel and latest kernel for 
context switch case, there i have found this and thought it is good to 
have for non-ssbs system to return early(as this might improve).

Please let me know if you want to run some tests.

Regards
Gaurav

WARNING: multiple messages have this Message-ID (diff)
From: Gaurav Kohli <gkohli@codeaurora.org>
To: Will Deacon <will@kernel.org>
Cc: maz@kernel.org, neeraju@codeaurora.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] arm64: Skip apply SSBS call for non SSBS system
Date: Wed, 12 Aug 2020 19:45:12 +0530	[thread overview]
Message-ID: <5b1ad0e0-bbe7-9869-ee19-1b62023203ed@codeaurora.org> (raw)
In-Reply-To: <20200812133043.GA8924@willie-the-truck>



On 8/12/2020 7:00 PM, Will Deacon wrote:
> On Tue, Aug 04, 2020 at 07:44:42PM +0530, Gaurav Kohli wrote:
>> In a system where no cpu's implement SSBS, for
>> them no need to set pstate. This might help to save
>> few cpu cycles during context switch.
>>
>> Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
>>
>> diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
>> index 6089638..79f80f1 100644
>> --- a/arch/arm64/kernel/process.c
>> +++ b/arch/arm64/kernel/process.c
>> @@ -477,6 +477,13 @@ static void ssbs_thread_switch(struct task_struct *next)
>>   	struct pt_regs *regs = task_pt_regs(next);
>>   
>>   	/*
>> +	 * For Targets which don't have SSBS support, they
>> +	 * can return from here.
>> +	 */
>> +	if (!IS_ENABLED(CONFIG_ARM64_SSBD))
>> +		return;
> 
> Does this actually make a measurable difference?
> 
> Will
> 

Hi Will,

While doing code review between older kernel and latest kernel for 
context switch case, there i have found this and thought it is good to 
have for non-ssbs system to return early(as this might improve).

Please let me know if you want to run some tests.

Regards
Gaurav

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-08-12 14:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 14:14 [PATCH] arm64: Skip apply SSBS call for non SSBS system Gaurav Kohli
2020-08-04 14:14 ` Gaurav Kohli
2019-04-15 16:40 ` [PATCH] nvmem: core: add NVMEM_SYSFS Kconfig Srinivas Kandagatla
2020-08-04 14:14   ` Gaurav Kohli
2019-04-16  5:19   ` Gaurav Kohli
2019-04-16  9:34     ` Mika Westerberg
2019-04-16  9:44       ` Srinivas Kandagatla
2019-04-16  9:47         ` Mika Westerberg
2020-08-04 14:26   ` Gaurav Kohli
2020-08-04 14:26     ` Gaurav Kohli
2020-08-04 14:14 ` [PATCH] nvmem: core: add support to NVMEM_NO_SYSFS_ENTRY Gaurav Kohli
2020-08-04 14:14   ` Gaurav Kohli
2020-08-04 14:25   ` Gaurav Kohli
2020-08-04 14:25     ` Gaurav Kohli
2020-08-11  4:48 ` [PATCH] arm64: Skip apply SSBS call for non SSBS system Gaurav Kohli
2020-08-11  4:48   ` Gaurav Kohli
2020-08-12 13:30 ` Will Deacon
2020-08-12 13:30   ` Will Deacon
2020-08-12 14:15   ` Gaurav Kohli [this message]
2020-08-12 14:15     ` Gaurav Kohli

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=5b1ad0e0-bbe7-9869-ee19-1b62023203ed@codeaurora.org \
    --to=gkohli@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=neeraju@codeaurora.org \
    --cc=will@kernel.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.