Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-04-15 Thread Nitesh Narayan Lal
On 4/14/21 12:11 PM, Jesse Brandeburg wrote: > Nitesh Narayan Lal wrote: > >>> The original issue as seen, was that if you rmmod/insmod a driver >>> *without* irqbalance running, the default irq mask is -1, which means >>> any CPU. The older kernels (this issue was patched in 2014) used to use

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-04-14 Thread Jesse Brandeburg
Nitesh Narayan Lal wrote: > > The original issue as seen, was that if you rmmod/insmod a driver > > *without* irqbalance running, the default irq mask is -1, which means > > any CPU. The older kernels (this issue was patched in 2014) used to use > > that affinity mask, but the value programmed

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-04-08 Thread Nitesh Narayan Lal
On 4/7/21 11:18 AM, Nitesh Narayan Lal wrote: > On 4/6/21 1:22 PM, Jesse Brandeburg wrote: >> Continuing a thread from a bit ago... >> >> Nitesh Narayan Lal wrote: >> After a little more digging, I found out why cpumask_local_spread change affects the general/initial smp_affinity for

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-04-07 Thread Nitesh Narayan Lal
On 4/6/21 1:22 PM, Jesse Brandeburg wrote: > Continuing a thread from a bit ago... > > Nitesh Narayan Lal wrote: > >>> After a little more digging, I found out why cpumask_local_spread change >>> affects the general/initial smp_affinity for certain device IRQs. >>> >>> After the introduction of

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-04-06 Thread Jesse Brandeburg
Continuing a thread from a bit ago... Nitesh Narayan Lal wrote: > > After a little more digging, I found out why cpumask_local_spread change > > affects the general/initial smp_affinity for certain device IRQs. > > > > After the introduction of the commit: > > > >     e2e64a932 genirq: Set

Re: [EXT] Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-03-04 Thread Nitesh Narayan Lal
On 3/4/21 4:13 PM, Alex Belits wrote: > On 3/4/21 10:15, Nitesh Narayan Lal wrote: >> External Email >> >> -- >> >> On 2/11/21 10:55 AM, Nitesh Narayan Lal wrote: >>> On 2/6/21 7:43 PM, Nitesh Narayan Lal wrote: On 2/5/21

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-03-04 Thread Nitesh Narayan Lal
On 2/11/21 10:55 AM, Nitesh Narayan Lal wrote: > On 2/6/21 7:43 PM, Nitesh Narayan Lal wrote: >> On 2/5/21 5:23 PM, Thomas Gleixner wrote: >>> On Thu, Feb 04 2021 at 14:17, Nitesh Narayan Lal wrote: On 2/4/21 2:06 PM, Marcelo Tosatti wrote: >>> How about adding a new flag for isolcpus

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-11 Thread Nitesh Narayan Lal
On 2/6/21 7:43 PM, Nitesh Narayan Lal wrote: > On 2/5/21 5:23 PM, Thomas Gleixner wrote: >> On Thu, Feb 04 2021 at 14:17, Nitesh Narayan Lal wrote: >>> On 2/4/21 2:06 PM, Marcelo Tosatti wrote: >> How about adding a new flag for isolcpus instead? >> > Do you mean a flag based on

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-06 Thread Nitesh Narayan Lal
On 2/5/21 5:23 PM, Thomas Gleixner wrote: > On Thu, Feb 04 2021 at 14:17, Nitesh Narayan Lal wrote: >> On 2/4/21 2:06 PM, Marcelo Tosatti wrote: > How about adding a new flag for isolcpus instead? > Do you mean a flag based on which we can switch the affinity mask to

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-05 Thread Thomas Gleixner
On Fri, Feb 05 2021 at 23:23, Thomas Gleixner wrote: > On Thu, Feb 04 2021 at 14:17, Nitesh Narayan Lal wrote: >> On 2/4/21 2:06 PM, Marcelo Tosatti wrote: > How about adding a new flag for isolcpus instead? > Do you mean a flag based on which we can switch the affinity mask to

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-05 Thread Thomas Gleixner
On Thu, Feb 04 2021 at 14:17, Nitesh Narayan Lal wrote: > On 2/4/21 2:06 PM, Marcelo Tosatti wrote: How about adding a new flag for isolcpus instead? >>> Do you mean a flag based on which we can switch the affinity mask to >>> housekeeping for all the devices at the time of IRQ

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-05 Thread Thomas Gleixner
On Fri, Jan 29 2021 at 09:35, Nitesh Narayan Lal wrote: > On 1/29/21 9:23 AM, Marcelo Tosatti wrote: >>> I am not sure about the PCI patch as I don't think we can control that from >>> the userspace or maybe I am wrong? >> You mean "lib: Restrict cpumask_local_spread to housekeeping CPUs" ? > >

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-04 Thread Nitesh Narayan Lal
On 2/4/21 2:06 PM, Marcelo Tosatti wrote: > On Thu, Feb 04, 2021 at 01:47:38PM -0500, Nitesh Narayan Lal wrote: [...] > Nitesh, is there anything preventing this from being fixed > in userspace ? (as Thomas suggested previously). Everything with is not managed can be steered by

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-04 Thread Marcelo Tosatti
On Thu, Feb 04, 2021 at 01:47:38PM -0500, Nitesh Narayan Lal wrote: > > On 2/4/21 1:15 PM, Marcelo Tosatti wrote: > > On Thu, Jan 28, 2021 at 09:01:37PM +0100, Thomas Gleixner wrote: > >> On Thu, Jan 28 2021 at 13:59, Marcelo Tosatti wrote: > The whole pile wants to be reverted. It's simply

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-04 Thread Nitesh Narayan Lal
On 2/4/21 1:15 PM, Marcelo Tosatti wrote: > On Thu, Jan 28, 2021 at 09:01:37PM +0100, Thomas Gleixner wrote: >> On Thu, Jan 28 2021 at 13:59, Marcelo Tosatti wrote: The whole pile wants to be reverted. It's simply broken in several ways. >>> I was asking for your comments on interaction

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-04 Thread Marcelo Tosatti
On Thu, Jan 28, 2021 at 09:01:37PM +0100, Thomas Gleixner wrote: > On Thu, Jan 28 2021 at 13:59, Marcelo Tosatti wrote: > >> The whole pile wants to be reverted. It's simply broken in several ways. > > > > I was asking for your comments on interaction with CPU hotplug :-) > > Which I answered in

Re: [EXT] Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-02-01 Thread Marcelo Tosatti
On Fri, Jan 29, 2021 at 07:41:27AM -0800, Alex Belits wrote: > On 1/28/21 07:56, Thomas Gleixner wrote: > > External Email > > > > -- > > On Wed, Jan 27 2021 at 10:09, Marcelo Tosatti wrote: > > > On Wed, Jan 27, 2021 at

Re: [EXT] Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-29 Thread Alex Belits
On 1/29/21 06:23, Marcelo Tosatti wrote: External Email -- On Fri, Jan 29, 2021 at 08:55:20AM -0500, Nitesh Narayan Lal wrote: On 1/28/21 3:01 PM, Thomas Gleixner wrote: On Thu, Jan 28 2021 at 13:59, Marcelo Tosatti wrote:

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-28 Thread Thomas Gleixner
On Thu, Jan 28 2021 at 13:59, Marcelo Tosatti wrote: >> The whole pile wants to be reverted. It's simply broken in several ways. > > I was asking for your comments on interaction with CPU hotplug :-) Which I answered in an seperate mail :) > So housekeeping_cpumask has multiple meanings. In this

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-28 Thread Nitesh Narayan Lal
On 1/28/21 11:59 AM, Marcelo Tosatti wrote: > On Thu, Jan 28, 2021 at 05:02:41PM +0100, Thomas Gleixner wrote: >> On Wed, Jan 27 2021 at 09:19, Marcelo Tosatti wrote: >>> On Wed, Jan 27, 2021 at 11:57:16AM +, Robin Murphy wrote: > + hk_flags = HK_FLAG_DOMAIN | HK_FLAG_MANAGED_IRQ; >

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-28 Thread Marcelo Tosatti
On Thu, Jan 28, 2021 at 04:56:07PM +0100, Thomas Gleixner wrote: > On Wed, Jan 27 2021 at 10:09, Marcelo Tosatti wrote: > > On Wed, Jan 27, 2021 at 12:36:30PM +, Robin Murphy wrote: > >> > > >/** > >> > > > * cpumask_next - get the next cpu in a cpumask > >> > > > @@ -205,22 +206,27 @@

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-28 Thread Marcelo Tosatti
On Thu, Jan 28, 2021 at 05:02:41PM +0100, Thomas Gleixner wrote: > On Wed, Jan 27 2021 at 09:19, Marcelo Tosatti wrote: > > On Wed, Jan 27, 2021 at 11:57:16AM +, Robin Murphy wrote: > >> > +hk_flags = HK_FLAG_DOMAIN | HK_FLAG_MANAGED_IRQ; > >> > +mask =

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-28 Thread Thomas Gleixner
On Wed, Jan 27 2021 at 09:19, Marcelo Tosatti wrote: > On Wed, Jan 27, 2021 at 11:57:16AM +, Robin Murphy wrote: >> > + hk_flags = HK_FLAG_DOMAIN | HK_FLAG_MANAGED_IRQ; >> > + mask = housekeeping_cpumask(hk_flags); >> >> AFAICS, this generally resolves to something based on

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-28 Thread Thomas Gleixner
On Wed, Jan 27 2021 at 10:09, Marcelo Tosatti wrote: > On Wed, Jan 27, 2021 at 12:36:30PM +, Robin Murphy wrote: >> > > >/** >> > > > * cpumask_next - get the next cpu in a cpumask >> > > > @@ -205,22 +206,27 @@ void __init >> > > > free_bootmem_cpumask_var(cpumask_var_t mask) >> > >

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-27 Thread Nitesh Narayan Lal
On 1/27/21 8:09 AM, Marcelo Tosatti wrote: > On Wed, Jan 27, 2021 at 12:36:30PM +, Robin Murphy wrote: >> On 2021-01-27 12:19, Marcelo Tosatti wrote: >>> On Wed, Jan 27, 2021 at 11:57:16AM +, Robin Murphy wrote: Hi, On 2020-06-25 23:34, Nitesh Narayan Lal wrote: >

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-27 Thread Robin Murphy
On 2021-01-27 13:09, Marcelo Tosatti wrote: On Wed, Jan 27, 2021 at 12:36:30PM +, Robin Murphy wrote: On 2021-01-27 12:19, Marcelo Tosatti wrote: On Wed, Jan 27, 2021 at 11:57:16AM +, Robin Murphy wrote: Hi, On 2020-06-25 23:34, Nitesh Narayan Lal wrote: From: Alex Belits The

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-27 Thread Marcelo Tosatti
On Wed, Jan 27, 2021 at 12:36:30PM +, Robin Murphy wrote: > On 2021-01-27 12:19, Marcelo Tosatti wrote: > > On Wed, Jan 27, 2021 at 11:57:16AM +, Robin Murphy wrote: > > > Hi, > > > > > > On 2020-06-25 23:34, Nitesh Narayan Lal wrote: > > > > From: Alex Belits > > > > > > > > The

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-27 Thread Robin Murphy
On 2021-01-27 12:19, Marcelo Tosatti wrote: On Wed, Jan 27, 2021 at 11:57:16AM +, Robin Murphy wrote: Hi, On 2020-06-25 23:34, Nitesh Narayan Lal wrote: From: Alex Belits The current implementation of cpumask_local_spread() does not respect the isolated CPUs, i.e., even if a CPU has

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-27 Thread Marcelo Tosatti
On Wed, Jan 27, 2021 at 11:57:16AM +, Robin Murphy wrote: > Hi, > > On 2020-06-25 23:34, Nitesh Narayan Lal wrote: > > From: Alex Belits > > > > The current implementation of cpumask_local_spread() does not respect the > > isolated CPUs, i.e., even if a CPU has been isolated for Real-Time

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2021-01-27 Thread Robin Murphy
Hi, On 2020-06-25 23:34, Nitesh Narayan Lal wrote: From: Alex Belits The current implementation of cpumask_local_spread() does not respect the isolated CPUs, i.e., even if a CPU has been isolated for Real-Time task, it will return it to the caller for pinning of its IRQ threads. Having these

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2020-06-30 Thread Nitesh Narayan Lal
On 6/30/20 8:32 PM, Andrew Morton wrote: > On Mon, 29 Jun 2020 12:11:25 -0400 Nitesh Narayan Lal > wrote: > >> On 6/25/20 6:34 PM, Nitesh Narayan Lal wrote: >>> From: Alex Belits >>> >>> The current implementation of cpumask_local_spread() does not respect the >>> isolated CPUs, i.e., even if

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2020-06-30 Thread Andrew Morton
On Mon, 29 Jun 2020 12:11:25 -0400 Nitesh Narayan Lal wrote: > > On 6/25/20 6:34 PM, Nitesh Narayan Lal wrote: > > From: Alex Belits > > > > The current implementation of cpumask_local_spread() does not respect the > > isolated CPUs, i.e., even if a CPU has been isolated for Real-Time task, >

Re: [Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2020-06-29 Thread Nitesh Narayan Lal
On 6/25/20 6:34 PM, Nitesh Narayan Lal wrote: > From: Alex Belits > > The current implementation of cpumask_local_spread() does not respect the > isolated CPUs, i.e., even if a CPU has been isolated for Real-Time task, > it will return it to the caller for pinning of its IRQ threads. Having >

[Patch v4 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2020-06-25 Thread Nitesh Narayan Lal
From: Alex Belits The current implementation of cpumask_local_spread() does not respect the isolated CPUs, i.e., even if a CPU has been isolated for Real-Time task, it will return it to the caller for pinning of its IRQ threads. Having these unwanted IRQ threads on an isolated CPU adds up to a