Re: [PATCH v2 4/4] tools/perf: Fix perf bench numa testcase to check if CPU used to bind task is online

2022-04-08 Thread Athira Rajeev
> On 08-Apr-2022, at 5:56 PM, Srikar Dronamraju > wrote: > > * Athira Rajeev [2022-04-06 23:21:13]: > >> Perf numa bench test fails with error: >> >> Testcase: >> ./perf bench numa mem -p 2 -t 1 -P 1024 -C 0,8 -M 1,0 -s 20 -zZq >> --thp 1 --no-data_rand_walk >> >> Failure snippet: >> <<>

Re: [PATCH V3] testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set

2022-04-08 Thread Athira Rajeev
> On 09-Apr-2022, at 12:00 AM, Shuah Khan wrote: > > On 4/8/22 1:24 AM, Athira Rajeev wrote: >> The selftest "mqueue/mq_perf_tests.c" use CPU_ALLOC to allocate >> CPU set. This cpu set is used further in pthread_attr_setaffinity_np >> and by pthread_create in the code. But in current code, all

Re: [PATCH v9 0/4] mm: Enable conversion of powerpc to default topdown mmap layout

2022-04-08 Thread Andrew Morton
On Fri, 8 Apr 2022 09:24:58 +0200 Christophe Leroy wrote: > Rebased on top of Linux 5.18-rc1 > > This is the mm part of the series that converts powerpc to default > topdown mmap layout, for merge into v5.18 We're at 5.18-rc1. The 5.18 merge window has closed and we're in fixes-only mode. I

[PATCH] macintosh: fix via-pmu and via-cuda build without RTC_CLASS

2022-04-08 Thread Randy Dunlap
Fix build when RTC_CLASS is not set/enabled. Eliminates these build errors: m68k-linux-ld: drivers/macintosh/via-pmu.o: in function `pmu_set_rtc_time': drivers/macintosh/via-pmu.c:1769: undefined reference to `rtc_tm_to_time64' m68k-linux-ld: drivers/macintosh/via-cuda.o: in function `cuda_set_rtc

Re: [PATCH net-next 11/15] sfc: Remove usage of list iterator for list_add() after the loop body

2022-04-08 Thread Jakob Koschel
Hello Edward, > On 7. Apr 2022, at 19:42, Edward Cree wrote: > > On 07/04/2022 11:28, Jakob Koschel wrote: >> In preparation to limit the scope of a list iterator to the list >> traversal loop, use a dedicated pointer to point to the found element [1]. >> >> Before, the code implicitly used the

Re: [PATCH net-next 02/15] net: dsa: sja1105: Remove usage of iterator for list_add() after loop

2022-04-08 Thread Vladimir Oltean
On Sat, Apr 09, 2022 at 01:58:29AM +0200, Jakob Koschel wrote: > Hello Jakub, > > Also the list_add() could be converted to list_add_tail(). > > Good point, I wasn't sure if that's considered as something that should be > done as a separate change. I'm happy to include it in v2. By now you probab

Re: [PATCH net-next 02/15] net: dsa: sja1105: Remove usage of iterator for list_add() after loop

2022-04-08 Thread Jakub Kicinski
On Sat, 9 Apr 2022 01:58:29 +0200 Jakob Koschel wrote: > > This turns a pretty slick piece of code into something ugly :( > > I'd rather you open coded the iteration here than make it more > > complex to satisfy "safe coding guidelines". > > I'm not entirely sure I understand what you mean with

Re: [PATCH net-next 03/15] net: dsa: mv88e6xxx: Replace usage of found with dedicated iterator

2022-04-08 Thread Jakob Koschel
> On 9. Apr 2022, at 01:50, Vladimir Oltean wrote: > > On Sat, Apr 09, 2022 at 01:44:00AM +0200, Jakob Koschel wrote: >>> Let's try to not make convoluted code worse. Do the following 2 patches >>> achieve what you are looking for? Originally I had a single patch (what >>> is now 2/2) but I fi

Re: [PATCH net-next 02/15] net: dsa: sja1105: Remove usage of iterator for list_add() after loop

2022-04-08 Thread Jakob Koschel
Hello Jakub, > On 8. Apr 2022, at 05:54, Jakub Kicinski wrote: > > On Thu, 7 Apr 2022 12:28:47 +0200 Jakob Koschel wrote: >> diff --git a/drivers/net/dsa/sja1105/sja1105_vl.c >> b/drivers/net/dsa/sja1105/sja1105_vl.c >> index b7e95d60a6e4..cfcae4d19eef 100644 >> --- a/drivers/net/dsa/sja1105/s

Re: [PATCH net-next 02/15] net: dsa: sja1105: Remove usage of iterator for list_add() after loop

2022-04-08 Thread Jakob Koschel
Hello Vladimir, > On 8. Apr 2022, at 13:41, Vladimir Oltean wrote: > > Hello Jakob, > > On Thu, Apr 07, 2022 at 12:28:47PM +0200, Jakob Koschel wrote: >> In preparation to limit the scope of a list iterator to the list >> traversal loop, use a dedicated pointer to point to the found element [1]

Re: [PATCH net-next 03/15] net: dsa: mv88e6xxx: Replace usage of found with dedicated iterator

2022-04-08 Thread Vladimir Oltean
On Sat, Apr 09, 2022 at 01:44:00AM +0200, Jakob Koschel wrote: > > Let's try to not make convoluted code worse. Do the following 2 patches > > achieve what you are looking for? Originally I had a single patch (what > > is now 2/2) but I figured it would be cleaner to break out the unrelated > > cha

Re: [PATCH net-next 02/15] net: dsa: sja1105: Remove usage of iterator for list_add() after loop

2022-04-08 Thread Jakob Koschel
Hey Christophe, > On 8. Apr 2022, at 09:47, Christophe Leroy > wrote: > > > > Le 07/04/2022 à 12:28, Jakob Koschel a écrit : >> In preparation to limit the scope of a list iterator to the list >> traversal loop, use a dedicated pointer to point to the found element [1]. >> >> Before, the cod

Re: [PATCH net-next 03/15] net: dsa: mv88e6xxx: Replace usage of found with dedicated iterator

2022-04-08 Thread Jakob Koschel
Hi Vladimir, > On 8. Apr 2022, at 14:31, Vladimir Oltean wrote: > > Hi Jakob, > > On Thu, Apr 07, 2022 at 12:28:48PM +0200, Jakob Koschel wrote: >> To move the list iterator variable into the list_for_each_entry_*() >> macro in the future it should be avoided to use the list iterator >> variabl

Re: [PATCH V3] testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set

2022-04-08 Thread Shuah Khan
On 4/8/22 1:24 AM, Athira Rajeev wrote: The selftest "mqueue/mq_perf_tests.c" use CPU_ALLOC to allocate CPU set. This cpu set is used further in pthread_attr_setaffinity_np and by pthread_create in the code. But in current code, allocated cpu set is not freed. Fix this issue by adding CPU_FREE i

Re: [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init

2022-04-08 Thread Mimi Zohar
On Fri, 2022-04-08 at 13:31 -0400, Mimi Zohar wrote: > On Fri, 2022-04-08 at 12:05 -0400, Mimi Zohar wrote: > > On Fri, 2022-04-08 at 00:15 +1000, Michael Ellerman wrote: > > > We can mark arch_get_ima_policy() as __init because it's only caller > > > ima_init_arch_policy() is __init. We can then m

Re: [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init

2022-04-08 Thread Mimi Zohar
On Fri, 2022-04-08 at 12:05 -0400, Mimi Zohar wrote: > On Fri, 2022-04-08 at 00:15 +1000, Michael Ellerman wrote: > > We can mark arch_get_ima_policy() as __init because it's only caller > > ima_init_arch_policy() is __init. We can then mark > > is_ppc_trustedboot_enabled() __init because its only

Re: rcu_sched self-detected stall on CPU

2022-04-08 Thread Miguel Ojeda
On Fri, Apr 8, 2022 at 4:42 PM Michael Ellerman wrote: > > The Rust CI has it disabled because I copied that from the x86 defconfig > they were using back when I added the Rust support. I think that was > meant to be a stripped down fast config for CI, but the result is it's Indeed, that was my i

Re: [PATCH] powerpc: Mark arch_get_ima_policy() and is_ppc_trustedboot_enabled() as __init

2022-04-08 Thread Mimi Zohar
On Fri, 2022-04-08 at 00:15 +1000, Michael Ellerman wrote: > We can mark arch_get_ima_policy() as __init because it's only caller > ima_init_arch_policy() is __init. We can then mark > is_ppc_trustedboot_enabled() __init because its only caller is > arch_get_ima_policy(). > > Signed-off-by: Michae

Re: rcu_sched self-detected stall on CPU

2022-04-08 Thread Paul E. McKenney
On Sat, Apr 09, 2022 at 12:42:39AM +1000, Michael Ellerman wrote: > Michael Ellerman writes: > > "Paul E. McKenney" writes: > >> On Wed, Apr 06, 2022 at 05:31:10PM +0800, Zhouyi Zhou wrote: > >>> Hi > >>> > >>> I can reproduce it in a ppc virtual cloud server provided by Oregon > >>> State Unive

[PATCH v4 2/2] PCI/DPC: Disable DPC service when link is in L2/L3 ready, L2 and L3 state

2022-04-08 Thread Kai-Heng Feng
On Intel Alder Lake platforms, Thunderbolt entering D3cold can cause some errors reported by AER: [ 30.100211] pcieport :00:1d.0: AER: Uncorrected (Non-Fatal) error received: :00:1d.0 [ 30.100251] pcieport :00:1d.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transactio

[PATCH v4 1/2] PCI/AER: Disable AER service when link is in L2/L3 ready, L2 and L3 state

2022-04-08 Thread Kai-Heng Feng
On Intel Alder Lake platforms, Thunderbolt entering D3cold can cause some errors reported by AER: [ 30.100211] pcieport :00:1d.0: AER: Uncorrected (Non-Fatal) error received: :00:1d.0 [ 30.100251] pcieport :00:1d.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transactio

Re: rcu_sched self-detected stall on CPU

2022-04-08 Thread Michael Ellerman
Michael Ellerman writes: > "Paul E. McKenney" writes: >> On Wed, Apr 06, 2022 at 05:31:10PM +0800, Zhouyi Zhou wrote: >>> Hi >>> >>> I can reproduce it in a ppc virtual cloud server provided by Oregon >>> State University. Following is what I do: >>> 1) curl -l >>> https://git.kernel.org/pub/s

Re: rcu_sched self-detected stall on CPU

2022-04-08 Thread Zhouyi Zhou
On Fri, Apr 8, 2022 at 10:07 PM Paul E. McKenney wrote: > > On Fri, Apr 08, 2022 at 06:02:19PM +0800, Zhouyi Zhou wrote: > > On Fri, Apr 8, 2022 at 3:23 PM Michael Ellerman wrote: > > > > > > "Paul E. McKenney" writes: > > > > On Wed, Apr 06, 2022 at 05:31:10PM +0800, Zhouyi Zhou wrote: > > > >>

Re: [PATCH v5] PCI hotplug: rpaphp: Error out on busy status from get-sensor-state

2022-04-08 Thread Mahesh J Salgaonkar
On 2022-03-09 22:42:16 Wed, Mahesh Salgaonkar wrote: > When certain PHB HW failure causes phyp to recover PHB, it marks the PE > state as temporarily unavailable until recovery is complete. This also > triggers an EEH handler in Linux which needs to notify drivers, and perform > recovery. But befor

Re: rcu_sched self-detected stall on CPU

2022-04-08 Thread Paul E. McKenney
On Fri, Apr 08, 2022 at 06:02:19PM +0800, Zhouyi Zhou wrote: > On Fri, Apr 8, 2022 at 3:23 PM Michael Ellerman wrote: > > > > "Paul E. McKenney" writes: > > > On Wed, Apr 06, 2022 at 05:31:10PM +0800, Zhouyi Zhou wrote: > > >> Hi > > >> > > >> I can reproduce it in a ppc virtual cloud server prov

Re: rcu_sched self-detected stall on CPU

2022-04-08 Thread Paul E. McKenney
On Fri, Apr 08, 2022 at 05:23:32PM +1000, Michael Ellerman wrote: > "Paul E. McKenney" writes: > > On Wed, Apr 06, 2022 at 05:31:10PM +0800, Zhouyi Zhou wrote: > >> Hi > >> > >> I can reproduce it in a ppc virtual cloud server provided by Oregon > >> State University. Following is what I do: > >

Re: rcu_sched self-detected stall on CPU

2022-04-08 Thread Miguel Ojeda
On Fri, Apr 8, 2022 at 9:23 AM Michael Ellerman wrote: > > I haven't seen it in my testing. But using Miguel's config I can > reproduce it seemingly on every boot. Hmm... I noticed this for some kernel builds: in some builds/commits, it triggered the very first time, while in others I had to re-t

Re: [PATCH V4 2/7] powerpc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-04-08 Thread Christophe Leroy
Le 07/04/2022 à 12:32, Anshuman Khandual a écrit : > This defines and exports a platform specific custom vm_get_page_prot() via > subscribing ARCH_HAS_VM_GET_PAGE_PROT. While here, this also localizes > arch_vm_get_page_prot() as powerpc_vm_get_page_prot() and moves it near > vm_get_page_prot().

Re: [PATCH net-next 03/15] net: dsa: mv88e6xxx: Replace usage of found with dedicated iterator

2022-04-08 Thread Vladimir Oltean
Hi Jakob, On Thu, Apr 07, 2022 at 12:28:48PM +0200, Jakob Koschel wrote: > To move the list iterator variable into the list_for_each_entry_*() > macro in the future it should be avoided to use the list iterator > variable after the loop body. > > To *never* use the list iterator variable after th

Re: [PATCH v2 3/4] tools/perf: Fix perf numa bench to fix usage of affinity for machines with #CPUs > 1K

2022-04-08 Thread Srikar Dronamraju
* Athira Rajeev [2022-04-06 23:21:12]: > perf bench numa testcase fails on systems with CPU's > more than 1K. > > Testcase: perf bench numa mem -p 1 -t 3 -P 512 -s 100 -zZ0qcm --thp 1 > Snippet of code: > <<>> > perf: bench/numa.c:302: bind_to_node: Assertion `!(ret)' failed. > Aborted (core du

Re: [PATCH v2 1/4] tools/perf: Fix perf bench futex to correct usage of affinity for machines with #CPUs > 1K

2022-04-08 Thread Srikar Dronamraju
* Athira Rajeev [2022-04-06 23:21:10]: > perf bench futex testcase fails on systems with CPU's > more than 1K. > > Testcase: perf bench futex all > Failure snippet: > <<>>Running futex/hash benchmark... > > perf: pthread_create: No such file or directory > <<>> > > All the futex benchmarks ( i

Re: [PATCH v2 4/4] tools/perf: Fix perf bench numa testcase to check if CPU used to bind task is online

2022-04-08 Thread Srikar Dronamraju
* Athira Rajeev [2022-04-06 23:21:13]: > Perf numa bench test fails with error: > > Testcase: > ./perf bench numa mem -p 2 -t 1 -P 1024 -C 0,8 -M 1,0 -s 20 -zZq > --thp 1 --no-data_rand_walk > > Failure snippet: > <<>> > Running 'numa/mem' benchmark: > > # Running main, "perf bench numa num

Re: [PATCH] powerpc/numa: Handle partially initialized numa nodes

2022-04-08 Thread Srikar Dronamraju
* Oscar Salvador [2022-04-06 18:19:00]: > On Wed, Mar 30, 2022 at 07:21:23PM +0530, Srikar Dronamraju wrote: > > arch/powerpc/mm/numa.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c > > index b9b7fefbb64b..13022d73

Re: [PATCH net-next 02/15] net: dsa: sja1105: Remove usage of iterator for list_add() after loop

2022-04-08 Thread Vladimir Oltean
Hello Jakob, On Thu, Apr 07, 2022 at 12:28:47PM +0200, Jakob Koschel wrote: > In preparation to limit the scope of a list iterator to the list > traversal loop, use a dedicated pointer to point to the found element [1]. > > Before, the code implicitly used the head when no element was found > whe

Re: [PATCH v3 1/2] PCI/AER: Disable AER service when link is in L2/L3 ready, L2 and L3 state

2022-04-08 Thread Kai-Heng Feng
On Thu, Mar 31, 2022 at 3:40 AM Sathyanarayanan Kuppuswamy wrote: > > > > On 3/29/22 1:31 AM, Kai-Heng Feng wrote: > > On some Intel AlderLake platforms, Thunderbolt entering D3cold can cause > > some errors reported by AER: > > [ 30.100211] pcieport :00:1d.0: AER: Uncorrected (Non-Fatal) er

Re: [PATCH V4 3/7] arm64/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-04-08 Thread Anshuman Khandual
On 4/8/22 15:58, Catalin Marinas wrote: > On Thu, Apr 07, 2022 at 04:02:47PM +0530, Anshuman Khandual wrote: >> diff --git a/arch/arm64/mm/mmap.c b/arch/arm64/mm/mmap.c >> index 77ada00280d9..307534fcec00 100644 >> --- a/arch/arm64/mm/mmap.c >> +++ b/arch/arm64/mm/mmap.c >> @@ -55,3 +55,36 @@ st

Re: [PATCH V4 7/7] mm/mmap: Drop arch_vm_get_page_pgprot()

2022-04-08 Thread Catalin Marinas
On Thu, Apr 07, 2022 at 04:02:51PM +0530, Anshuman Khandual wrote: > There are no platforms left which use arch_vm_get_page_prot(). Just drop > generic arch_vm_get_page_prot(). > > Cc: Andrew Morton > Cc: linux...@kvack.org > Cc: linux-ker...@vger.kernel.org > Signed-off-by: Anshuman Khandual R

Re: [PATCH V4 6/7] mm/mmap: Drop arch_filter_pgprot()

2022-04-08 Thread Catalin Marinas
On Thu, Apr 07, 2022 at 04:02:50PM +0530, Anshuman Khandual wrote: > There are no platforms left which subscribe ARCH_HAS_FILTER_PGPROT. Hence > drop generic arch_filter_pgprot() and also config ARCH_HAS_FILTER_PGPROT. > > Cc: Andrew Morton > Cc: linux...@kvack.org > Cc: linux-ker...@vger.kernel.

Re: [PATCH V4 3/7] arm64/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-04-08 Thread Catalin Marinas
On Thu, Apr 07, 2022 at 04:02:47PM +0530, Anshuman Khandual wrote: > diff --git a/arch/arm64/mm/mmap.c b/arch/arm64/mm/mmap.c > index 77ada00280d9..307534fcec00 100644 > --- a/arch/arm64/mm/mmap.c > +++ b/arch/arm64/mm/mmap.c > @@ -55,3 +55,36 @@ static int __init adjust_protection_map(void) >

Re: rcu_sched self-detected stall on CPU

2022-04-08 Thread Zhouyi Zhou
On Fri, Apr 8, 2022 at 3:23 PM Michael Ellerman wrote: > > "Paul E. McKenney" writes: > > On Wed, Apr 06, 2022 at 05:31:10PM +0800, Zhouyi Zhou wrote: > >> Hi > >> > >> I can reproduce it in a ppc virtual cloud server provided by Oregon > >> State University. Following is what I do: > >> 1) curl

Re: [PATCH V4 1/7] mm/mmap: Add new config ARCH_HAS_VM_GET_PAGE_PROT

2022-04-08 Thread Catalin Marinas
On Thu, Apr 07, 2022 at 04:02:45PM +0530, Anshuman Khandual wrote: > Add a new config ARCH_HAS_VM_GET_PAGE_PROT, which when subscribed enables a > given platform to define its own vm_get_page_prot() but still utilizing the > generic protection_map[] array. > > Cc: Andrew Morton > Cc: linux...@kva

Re: [PATCH net-next 02/15] net: dsa: sja1105: Remove usage of iterator for list_add() after loop

2022-04-08 Thread Christophe Leroy
Le 07/04/2022 à 12:28, Jakob Koschel a écrit : > In preparation to limit the scope of a list iterator to the list > traversal loop, use a dedicated pointer to point to the found element [1]. > > Before, the code implicitly used the head when no element was found > when using &pos->list. Since th

Re: [PATCH V2] testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set

2022-04-08 Thread Athira Rajeev
> On 08-Apr-2022, at 12:31 AM, Shuah Khan wrote: > > On 4/7/22 12:40 PM, Athira Rajeev wrote: >> The selftest "mqueue/mq_perf_tests.c" use CPU_ALLOC to allocate >> CPU set. This cpu set is used further in pthread_attr_setaffinity_np >> and by pthread_create in the code. But in current code, al

[PATCH v9 3/4] mm: Add len and flags parameters to arch_get_mmap_end()

2022-04-08 Thread Christophe Leroy
Powerpc needs flags and len to make decision on arch_get_mmap_end(). So add them as parameters to arch_get_mmap_end(). Signed-off-by: Christophe Leroy Cc: Steve Capper Cc: Catalin Marinas Cc: Will Deacon Acked-by: Catalin Marinas --- arch/arm64/include/asm/processor.h | 4 ++-- mm/mmap.c

[PATCH v9 4/4] mm, hugetlbfs: Allow for "high" userspace addresses

2022-04-08 Thread Christophe Leroy
This is a complement of f6795053dac8 ("mm: mmap: Allow for "high" userspace addresses") for hugetlb. This patch adds support for "high" userspace addresses that are optionally supported on the system and have to be requested via a hint mechanism ("high" addr parameter to mmap). Architectures such

[PATCH v9 0/4] mm: Enable conversion of powerpc to default topdown mmap layout

2022-04-08 Thread Christophe Leroy
Rebased on top of Linux 5.18-rc1 This is the mm part of the series that converts powerpc to default topdown mmap layout, for merge into v5.18 powerpc requires its own arch_get_unmapped_area() only when slices are needed, which is only for book3s/64. First part of the series moves slices into book

[PATCH v9 2/4] mm, hugetlbfs: Allow an arch to always use generic versions of get_unmapped_area functions

2022-04-08 Thread Christophe Leroy
Unlike most architectures, powerpc can only define at runtime if it is going to use the generic arch_get_unmapped_area() or not. Today, powerpc has a copy of the generic arch_get_unmapped_area() because when selection HAVE_ARCH_UNMAPPED_AREA the generic arch_get_unmapped_area() is not available.

[PATCH v9 1/4] mm: Allow arch specific arch_randomize_brk() with CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT

2022-04-08 Thread Christophe Leroy
Commit e7142bf5d231 ("arm64, mm: make randomization selected by generic topdown mmap layout") introduced a default version of arch_randomize_brk() provided when CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT is selected. powerpc could select CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT but needs to

[PATCH V3] testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set

2022-04-08 Thread Athira Rajeev
The selftest "mqueue/mq_perf_tests.c" use CPU_ALLOC to allocate CPU set. This cpu set is used further in pthread_attr_setaffinity_np and by pthread_create in the code. But in current code, allocated cpu set is not freed. Fix this issue by adding CPU_FREE in the "shutdown" function which is called

Re: rcu_sched self-detected stall on CPU

2022-04-08 Thread Michael Ellerman
"Paul E. McKenney" writes: > On Wed, Apr 06, 2022 at 05:31:10PM +0800, Zhouyi Zhou wrote: >> Hi >> >> I can reproduce it in a ppc virtual cloud server provided by Oregon >> State University. Following is what I do: >> 1) curl -l >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.