On a 16-socket 192-core POWER8 system, the context_switch1_threads
benchmark from will-it-scale (see earlier changelog), upstream can
achieve a rate of about 1 million context switches per second, due to
contention on the mm refcount.
64s meets the prerequisites for CONFIG_MMU_LAZY_TLB_SHOOTDOWN,
On big systems, the mm refcount can become highly contented when doing a
lot of context switching with threaded applications. user<->idle switch
is one of the important cases. Abandoning lazy tlb entirely slows this
switching down quite a bit in the common uncontended case, so that is
not viable.
Add CONFIG_MMU_TLB_REFCOUNT which enables refcounting of the lazy tlb mm
when it is context switched. This can be disabled by architectures that
don't require this refcounting if they clean up lazy tlb mms when the
last refcount is dropped. Currently this is always enabled, so the patch
introduces
Add explicit _lazy_tlb annotated functions for lazy tlb mm refcounting.
This makes the lazy tlb mm references more obvious, and allows the
refcounting scheme to be modified in later changes. There is no
functional change with this patch.
Acked-by: Linus Torvalds
Signed-off-by: Nicholas Piggin
--
Remove the special case avoiding refcounting when the mm to be used is
the same as the kernel thread's active (lazy tlb) mm. kthread_use_mm()
should not be such a performance critical path that this matters much.
This simplifies a later change to lazy tlb mm refcounting.
Acked-by: Linus Torvalds
(Sorry about the double send)
Hi Andrew,
This series improves scalability of context switching between user and
kernel threads on large systems with a threaded process spread across a
lot of CPUs.
Please consider these patches for mm. Discussion of v6 here:
https://lore.kernel.org/linux-mm/2023
On Thu, Feb 02, 2023 at 04:28:01PM -0600, Brian King wrote:
> Rather than manually creating attributes for the hvcs driver,
> let the driver core do this for us. This also fixes some hotplug
> remove issues and ensures that cleanup of these attributes
> is done in the right order.
>
> Signed-off-b
On Thu, Feb 02, 2023 at 04:27:59PM -0600, Brian King wrote:
> The hvcs driver only ever gets two references to the port. One
> at initialization time, and one at install time. Remove the code
> that was trying to do multiple port puts for each open, which
> would result in more puts than gets.
>
>
On Thu, Feb 02, 2023 at 04:28:00PM -0600, Brian King wrote:
> Use the dev_groups functionality to manage the attribute groups
> for hvcs devices. This simplifies the code and also eliminates
> errors coming from kernfs when attempting to remove a console
> device that is in use.
>
> Signed-off-by:
On 2/1/23 19:41, Sachin Sant wrote:
>
>
>> On 01-Feb-2023, at 12:18 AM, Kajol Jain wrote:
>>
>> Commit ec3eb9d941a9 ("powerpc/perf: Use PVR rather than
>> oprofile field to determine CPU version") added usage
>> of pvr value instead of oprofile field to determine the
>> platform. In hv-24x7 p
On Fri Feb 3, 2023 at 12:02 PM AEST, Benjamin Gray wrote:
> On Fri, 2023-02-03 at 00:46 +0100, Erhard F. wrote:
> > Happened during boot:
> >
> > [...]
> > Creating 6 MTD partitions on "flash@0":
> > 0x-0x0400 : "PNOR"
> > 0x01b21000-0x03921000 : "BOOTKERNEL"
> > 0x
On Fri, 2023-02-03 at 00:46 +0100, Erhard F. wrote:
> Happened during boot:
>
> [...]
> Creating 6 MTD partitions on "flash@0":
> 0x-0x0400 : "PNOR"
> 0x01b21000-0x03921000 : "BOOTKERNEL"
> 0x03a44000-0x03a68000 : "CAPP"
> 0x03a88000-0x03a89000 : "VERSIO
On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers wrote:
>
> ARM64 overrides a weak function but a previous change had broken the
> build.
>
> Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
only on tmp.perf/core the
ARM64 overrides a weak function but a previous change had broken the
build.
Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
Signed-off-by: Ian Rogers
---
tools/perf/arch/arm64/util/pmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/arch/arm64/util/pmu.c b
File read/write is reimplemented in about 5 different ways in the
various PowerPC selftests. This indicates it should be a common util.
Add a common read_file / write_file implementation and convert users
to it where (easily) possible.
Signed-off-by: Benjamin Gray
---
v4: * Set errno as ex
Add helper functions to read and write (unsigned) long values directly
from/to files. One of the kernel interfaces uses hex strings, so we need
to allow passing a base too.
Signed-off-by: Benjamin Gray
---
v4: * Set errno where it isn't already set
---
tools/testing/selftests/powerpc/dscr/
Started this when writing tests for a feature I'm working on, needing a way to
read/write numbers to system files. After writing some utils to safely handle
file IO and parsing, I realised I'd made the ~6th file read/write implementation
and only(?) number parser that checks all the failure modes w
A couple of tests roll their own auto-allocating file read logic.
Add a generic implementation and convert them to use it.
Signed-off-by: Benjamin Gray
---
v4: * Make allocation more concise using realloc(NULL, length)
without special casing initial malloc(length)
---
.../testin
Debugfs files are not always integers, so make *_file return/write a
byte buffer, and *_int deal with int values specifically. This increases
consistency with the other file read/write helpers.
Signed-off-by: Benjamin Gray
Reviewed-by: Andrew Donnellan
---
v4: * Add reviewed-by
---
.../te
Often a file is expected to hold an integral value. Existing functions
will use a C stdlib function like atoi or strtol to parse the file.
These operations are error prone, with complicated error conditions
(atoi returns 0 if not a number, and is undefined behaviour if not in
range. strtol returns
Synchronizes hotplug remove with the freeing of the port.
This ensures we have freed all the memory associated with
this port and are not leaking memory.
Signed-off-by: Brian King
---
drivers/tty/hvc/hvcs.c | 26 +++---
1 file changed, 15 insertions(+), 11 deletions(-)
diff
When hotplug removing an hvcs device, we need to ensure the
hangup processing is done prior to exiting the remove function,
so use tty_vhangup to do the hangup processing directly
rather than using tty_hangup which simply schedules the hangup
work for later execution.
Signed-off-by: Brian King
--
Grab a reference to the tty when removing the hvcs to ensure
it does not get freed unexpectedly.
Signed-off-by: Brian King
---
drivers/tty/hvc/hvcs.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 5de7ad40..04c5
Rather than manually creating attributes for the hvcs driver,
let the driver core do this for us. This also fixes some hotplug
remove issues and ensures that cleanup of these attributes
is done in the right order.
Signed-off-by: Brian King
---
drivers/tty/hvc/hvcs.c | 24 +++-
Use the dev_groups functionality to manage the attribute groups
for hvcs devices. This simplifies the code and also eliminates
errors coming from kernfs when attempting to remove a console
device that is in use.
Signed-off-by: Brian King
---
drivers/tty/hvc/hvcs.c | 24 +++-
The hvcs driver only ever gets two references to the port. One
at initialization time, and one at install time. Remove the code
that was trying to do multiple port puts for each open, which
would result in more puts than gets.
Signed-off-by: Brian King
---
drivers/tty/hvc/hvcs.c | 18 ---
This patch series fixes a number of issues with hotplugging
hvcs devices including memory leaks as well as, the inability
to reconnect to a console device after it has been hot added
back, since it was not getting cleaned up properly on the
hotplug remove path.
Changes since initial version:
- Cha
On 2/2/23 09:37, Eric DeVolder wrote:
On 2/1/23 00:38, Sourabh Jain wrote:
On architectures like PowerPC the crash notes are available for all
possible CPUs. So let's populate the elfcorehdr for all possible
CPUs having crash notes to avoid updating elfcorehdr during in-kernel
crash update
> Subject: [PATCH 1/1] PCI: layerscape: Add the workaround for A-010305
>
> From: Xiaowei Bao
>
> When a link down or hot reset event occurs, the PCI Express EP
> controller's Link Capabilities Register should retain the values of
> the Maximum Link Width and Supported Link Speed configured by R
> Subject: [PATCH 1/1] PCI: layerscape: Set 64-bit DMA mask
>
> From: Guanhua Gao
>
> Set DMA mask and coherent DMA mask to enable 64-bit addressing.
>
> Signed-off-by: Guanhua Gao
> Signed-off-by: Hou Zhiqiang
> Signed-off-by: Frank Li
> ---
Ping
> drivers/pci/controller/dwc/pci-layers
> Subject: [EXT] [PATCH v2 1/1] PCI: layerscape: Add EP mode support for
> ls1028a
>
> Caution: EXT Email
>
> From: Xiaowei Bao
>
> Add PCIe EP mode support for ls1028a.
>
> Signed-off-by: Xiaowei Bao
> Signed-off-by: Hou Zhiqiang
> Signed-off-by: Frank Li
> Acked-by: Roy Zang
>
[Fran
> On 30-Jan-2023, at 3:14 PM, Mahesh J Salgaonkar wrote:
>
> On 2023-01-18 11:14:50 Wed, Athira Rajeev wrote:
>> Add a function dt_find_by_name_substr() that returns the child node if
>> it matches till first occurence at "@" of a given name, otherwise NULL.
>> This is helpful for cases with n
Testcase stat_all_metrics.sh fails in powerpc:
92: perf all metrics test : FAILED!
Logs with verbose:
[command]# ./perf test 92 -vv
92: perf all metrics test :
--- start ---
test child forked, pid 13262
Testing BRU_STALL_CPI
Testing COMPLETION_STALL
-20230202
(https://download.01.org/0day-ci/archive/20230203/202302030001.hqpci490-...@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod
On 2/1/23 00:38, Sourabh Jain wrote:
On architectures like PowerPC the crash notes are available for all
possible CPUs. So let's populate the elfcorehdr for all possible
CPUs having crash notes to avoid updating elfcorehdr during in-kernel
crash update on CPU hotplug events.
The similar techn
When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time. To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.
Cc: Michael Ellerman
Cc: Nicholas Piggin
Cc: Christophe Leroy
Cc: Alex
>> ---[ end trace ]---
>> [ cut here ]
>> RCU not on for: shared_cede_loop+0xc/0x170
>>
>> The code in question was added by
>> commit d099dbfd330686a8c09cd8944bcc77a56f9e7815
>>cpuidle: tracing: Warn about !rcu_is_watching()
>
> Note that by selecting
>
> Reported-by: Sachin Sant
> Suggested-by: Peter Zijlstra
> Signed-off-by: Michael Ellerman
> ---
Thanks for the patch Michael.
Tested-by: Sachin Sant
> arch/powerpc/Kconfig | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index b8c4
Commit 41b7a347bf14 ("powerpc: Book3S 64-bit outline-only KASAN
support") added a select of ARCH_WANTS_NO_INSTR, because it also added
some uses of noinstr. However noinstr is always defined, regardless of
ARCH_WANTS_NO_INSTR, so there's no need to select it just for that.
As PeterZ says [1]:
No
CLANG only knows the following CPUs:
generic, 440, 450, 601, 602, 603, 603e, 603ev, 604, 604e, 620, 630,
g3, 7400, g4, 7450, g4+, 750, 8548, 970, g5, a2, e500, e500mc, e5500,
power3, pwr3, power4, pwr4, power5, pwr5, power5x, pwr5x, power6,
pwr6, power6x, pwr6x, power7, pwr7, power8, pwr8, power9,
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
next-test
branch HEAD: 9ffcf6a19dbb2a24de2c2d7b2af1e130986cd565 integrity/powerpc:
Support loading keys from PLPKS
Error/Warning ids grouped by kconfigs:
gcc_recent_errors
`-- powerpc-allmodconfig
`-- pci.c:(.in
On Thu, Feb 02, 2023 at 01:46:32PM +0530, Sachin Sant wrote:
> Following warning is seen with 6.2.0-rc6-next-20230201 on a
> Power10 server.
>
> [ cut here ]
> RCU not on for: check_return_regs_valid+0xc/0x1e0
> WARNING: CPU: 9 PID: 0 at include/linux/trace_recursion.h:162
Following warning is seen with 6.2.0-rc6-next-20230201 on a
Power10 server.
[ cut here ]
RCU not on for: check_return_regs_valid+0xc/0x1e0
WARNING: CPU: 9 PID: 0 at include/linux/trace_recursion.h:162
arch_ftrace_ops_list_func+0x2c0/0x2e0
Modules linked in: kmem device_dax
Patchset looks goot to me
Reviewed-By: Kajol Jain
On 1/27/23 05:06, Ian Rogers wrote:
> Add an optimization to jevents using the metric code, rewrite metrics
> in terms of each other in order to minimize size and improve
> readability. For example, on Power8
> other_stall_cpi is rewritten from:
>
44 matches
Mail list logo