linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v3] irq: consider cpus on nodes are unbalanced
       [not found] <20220210031053.5352-1-yamamoto.rei@jp.fujitsu.com>
@ 2022-02-10  4:10 ` Ming Lei
  2022-03-30  4:42   ` Rei Yamamoto
  0 siblings, 1 reply; 4+ messages in thread
From: Ming Lei @ 2022-02-10  4:10 UTC (permalink / raw)
  To: Rei Yamamoto; +Cc: Thomas Gleixner, linux-kernel

On Thu, Feb 10, 2022 at 12:10:53PM +0900, Rei Yamamoto wrote:
> If cpus on a node are offline at boot time, there are
> difference in the number of nodes between when building affinity
> masks for present cpus and when building affinity masks for possible
> cpus. This patch fixes a problem caused by the difference of the
> number of nodes:
> 
>  - The routine of "numvecs <= nodes" condition can overwrite bits of
>    masks for present cpus in building masks for possible cpus. Fix this
>    problem by making CPU bits, which is not target, not changing.
> 
> Signed-off-by: Rei Yamamoto <yamamoto.rei@jp.fujitsu.com>
> Reviewed-by: Ming Lei <ming.lei@redhat.com>
> ---
>  kernel/irq/affinity.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
> index f7ff8919dc9b..d2d01565d2ec 100644
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -269,8 +269,9 @@ static int __irq_build_affinity_masks(unsigned int startvec,
>  	 */
>  	if (numvecs <= nodes) {
>  		for_each_node_mask(n, nodemsk) {
> +			cpumask_and(nmsk, cpu_mask, node_to_cpumask[n]);
>  			cpumask_or(&masks[curvec].mask, &masks[curvec].mask,
> -				   node_to_cpumask[n]);
> +				   nmsk);
>  			if (++curvec == last_affv)
>  				curvec = firstvec;
>  		}
> -- 
> 2.27.0
> 

-- 
Ming


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] irq: consider cpus on nodes are unbalanced
  2022-02-10  4:10 ` [PATCH v3] irq: consider cpus on nodes are unbalanced Ming Lei
@ 2022-03-30  4:42   ` Rei Yamamoto
  2022-03-30 23:09     ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: Rei Yamamoto @ 2022-03-30  4:42 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, ming.lei, yamamoto.rei

On Thu, Feb 10, 2022 at 12:10:18PM +0800, Ming Lei wrote:
> On Thu, Feb 10, 2022 at 12:10:53PM +0900, Rei Yamamoto wrote:
>> If cpus on a node are offline at boot time, there are
>> difference in the number of nodes between when building affinity
>> masks for present cpus and when building affinity masks for possible
>> cpus. This patch fixes a problem caused by the difference of the
>> number of nodes:
>> 
>>  - The routine of "numvecs <= nodes" condition can overwrite bits of
>>    masks for present cpus in building masks for possible cpus. Fix this
>>    problem by making CPU bits, which is not target, not changing.
>> 
>> Signed-off-by: Rei Yamamoto <yamamoto.rei@jp.fujitsu.com>
>> Reviewed-by: Ming Lei <ming.lei@redhat.com>
>> ---
>>  kernel/irq/affinity.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
>> index f7ff8919dc9b..d2d01565d2ec 100644
>> --- a/kernel/irq/affinity.c
>> +++ b/kernel/irq/affinity.c
>> @@ -269,8 +269,9 @@ static int __irq_build_affinity_masks(unsigned int startvec,
>>  	 */
>>  	if (numvecs <= nodes) {
>>  		for_each_node_mask(n, nodemsk) {
>> +			cpumask_and(nmsk, cpu_mask, node_to_cpumask[n]);
>>  			cpumask_or(&masks[curvec].mask, &masks[curvec].mask,
>> -				   node_to_cpumask[n]);
>> +				   nmsk);
>>  			if (++curvec == last_affv)
>>  				curvec = firstvec;
>>  		}
>> -- 
>> 2.27.0
>>
> -- 
> Ming

Could you pick this patch up?

Thanks,
Rei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] irq: consider cpus on nodes are unbalanced
  2022-03-30  4:42   ` Rei Yamamoto
@ 2022-03-30 23:09     ` Thomas Gleixner
  2022-03-31  0:24       ` Rei Yamamoto
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2022-03-30 23:09 UTC (permalink / raw)
  To: Rei Yamamoto; +Cc: linux-kernel, ming.lei

On Wed, Mar 30 2022 at 13:42, Rei Yamamoto wrote:
> On Thu, Feb 10, 2022 at 12:10:18PM +0800, Ming Lei wrote:
>> On Thu, Feb 10, 2022 at 12:10:53PM +0900, Rei Yamamoto wrote:
>
> Could you pick this patch up?

Which patch? Whatever that patch is, it did neither arrive in my inbox
nor in a public archive:

    https://lore.kernel.org/all/20220210031053.5352-1-yamamoto.rei@jp.fujitsu.com/

Thanks,

        tglx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] irq: consider cpus on nodes are unbalanced
  2022-03-30 23:09     ` Thomas Gleixner
@ 2022-03-31  0:24       ` Rei Yamamoto
  0 siblings, 0 replies; 4+ messages in thread
From: Rei Yamamoto @ 2022-03-31  0:24 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, ming.lei, yamamoto.rei

On Thu, Mar 31 2022 at 01:09:03 +0200 Thomas Gleixner wrote:
> On Wed, Mar 30 2022 at 13:42, Rei Yamamoto wrote:
>> On Thu, Feb 10, 2022 at 12:10:18PM +0800, Ming Lei wrote:
>>> On Thu, Feb 10, 2022 at 12:10:53PM +0900, Rei Yamamoto wrote:
>>
>> Could you pick this patch up?
>
> Which patch? Whatever that patch is, it did neither arrive in my inbox nor in a public archive:
>
>    https://lore.kernel.org/all/20220210031053.5352-1-yamamoto.rei@jp.fujitsu.com/

Certainly the patch did not seem to arrive.
I will send the patch ,which I want you to pick up, as v4.

Thanks, 
Rei

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-31  0:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220210031053.5352-1-yamamoto.rei@jp.fujitsu.com>
2022-02-10  4:10 ` [PATCH v3] irq: consider cpus on nodes are unbalanced Ming Lei
2022-03-30  4:42   ` Rei Yamamoto
2022-03-30 23:09     ` Thomas Gleixner
2022-03-31  0:24       ` Rei Yamamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).