[PATCH v3 11/11] perf jevents: Add model list option

2023-01-23 Thread Ian Rogers
This allows the set of generated jevents events and metrics be limited to a subset of the model names. Appropriate if trying to minimize the binary size where only a set of models are possible. On ARM64 the --model selects the implementor rather than model. Signed-off-by: Ian Rogers ---

[PATCH v3 10/11] perf jevents: Generate metrics and events as separate tables

2023-01-23 Thread Ian Rogers
Turn a perf json event into an event, metric or both. This reduces the number of events needed to scan to find an event or metric. As events no longer need the relatively seldom used metric fields, 4 bytes is saved per event. This reduces the big C string's size by 335kb (14.8%) on x86. Note, for

[PATCH v3 09/11] perf pmu-events: Introduce pmu_metrics_table

2023-01-23 Thread Ian Rogers
Add a metrics table that is just a cast from pmu_events_table. This changes the APIs so that event and metric usage of the underlying table is different. For the no jevents case the tables are already separate, later changes will separate the tables for the jevents case. Signed-off-by: Ian Rogers

[PATCH v3 08/11] perf jevents: Combine table prefix and suffix writing

2023-01-23 Thread Ian Rogers
Combine into a single function to simplify, in a later change, writing metrics separately. Signed-off-by: Ian Rogers --- tools/perf/pmu-events/jevents.py | 36 +--- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/tools/perf/pmu-events/jevents.py

[PATCH v3 07/11] perf stat: Remove evsel metric_name/expr

2023-01-23 Thread Ian Rogers
Metrics are their own unit and these variables held broken metrics previously and now just hold the value NULL. Remove code that used these variables. Reviewed-by: John Garry Signed-off-by: Ian Rogers --- tools/perf/builtin-stat.c | 1 - tools/perf/util/cgroup.c | 1 -

[PATCH v3 06/11] perf pmu-events: Remove now unused event and metric variables

2023-01-23 Thread Ian Rogers
Previous changes separated the uses of pmu_event and pmu_metric, however, both structures contained all the variables of event and metric. This change removes the event variables from metric and the metric variables from event. Note, this change removes the setting of evsel's metric_name/expr as

[PATCH v3 05/11] perf pmu-events: Separate the metrics from events for no jevents

2023-01-23 Thread Ian Rogers
Separate the event and metric table when building without jevents. Add find_core_metrics_table and perf_pmu__find_metrics_table while renaming existing utilities to be event specific, so that users can find the right table for their need. Signed-off-by: Ian Rogers ---

[PATCH v3 04/11] perf pmu-events: Add separate metric from pmu_event

2023-01-23 Thread Ian Rogers
Create a new pmu_metric for the metric related variables from pmu_event but that is initially just a clone of pmu_event. Add iterators for pmu_metric and use in places that metrics are desired rather than events. Make the event iterator skip metric only events, and the metric iterator skip event

[PATCH v3 03/11] perf jevents: Rewrite metrics in the same file with each other

2023-01-23 Thread Ian Rogers
Rewrite metrics within the same file in terms of each other. For example, on Power8 other_stall_cpi is rewritten from: "PM_CMPLU_STALL / PM_RUN_INST_CMPL - PM_CMPLU_STALL_BRU_CRU / PM_RUN_INST_CMPL - PM_CMPLU_STALL_FXU / PM_RUN_INST_CMPL - PM_CMPLU_STALL_VSU / PM_RUN_INST_CMPL -

[PATCH v3 02/11] perf jevents metric: Add ability to rewrite metrics in terms of others

2023-01-23 Thread Ian Rogers
Add RewriteMetricsInTermsOfOthers that iterates over pairs of names and expressions trying to replace an expression, within the current expression, with its name. Signed-off-by: Ian Rogers --- tools/perf/pmu-events/metric.py | 73 +++-

[PATCH v3 01/11] perf jevents metric: Correct Function equality

2023-01-23 Thread Ian Rogers
rhs may not be defined, say for source_count, so add a guard. Signed-off-by: Ian Rogers --- tools/perf/pmu-events/metric.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/perf/pmu-events/metric.py b/tools/perf/pmu-events/metric.py index

[PATCH v3 00/11] jevents/pmu-events improvements

2023-01-23 Thread Ian Rogers
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: "PM_CMPLU_STALL / PM_RUN_INST_CMPL - PM_CMPLU_STALL_BRU_CRU / PM_RUN_INST_CMPL -

Re: [RFC PATCH 01/19] mm: Introduce vm_account

2023-01-23 Thread Christoph Hellwig
> +/** > + * vm_account_init - Initialise a new struct vm_account. > + * @vm_account: pointer to uninitialised vm_account. > + * @task: task to charge against. > + * @user: user to charge against. Must be non-NULL for VM_ACCOUNT_USER. > + * @flags: flags to use when charging to vm_account. > + * >

[RFC PATCH 12/19] kvm/book3s_64_vio: Convert account_locked_vm() to vm_account_pinned()

2023-01-23 Thread Alistair Popple
book3s_64_vio currently accounts for pinned pages with account_locked_vm() which charges the pages to mm->locked_vm. To make this consistent with other drivers switch to using vm_account_pinned(). Signed-off-by: Alistair Popple Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc:

[RFC PATCH 08/19] vfio/spapr_tce: Convert accounting to pinned_vm

2023-01-23 Thread Alistair Popple
Convert from accounting pages against locked_vm to accounting them to pinned_vm. This allows struct vm_account to be used to track the mm_struct used to charge the pages. A future change also uses this to track a cgroup for controlling pinned pages. Signed-off-by: Alistair Popple Cc: Michael

[RFC PATCH 01/19] mm: Introduce vm_account

2023-01-23 Thread Alistair Popple
Kernel drivers that pin pages should account these pages against either user->locked_vm or mm->pinned_vm and fail the pinning if RLIMIT_MEMLOCK is exceeded and CAP_IPC_LOCK isn't held. Currently drivers open-code this accounting and use various methods to update the atomic variables and check

Re: [PATCH v4 24/24] integrity/powerpc: Support loading keys from pseries secvar

2023-01-23 Thread Nicholas Piggin
On Fri Jan 20, 2023 at 5:43 PM AEST, Andrew Donnellan wrote: > From: Russell Currey > > The secvar object format is only in the device tree under powernv. > We now have an API call to retrieve it in a generic way, so we should > use that instead of having to handle the DT here. > > Add support

Re: [PATCH v4 22/24] powerpc/pseries: Implement secvars for dynamic secure boot

2023-01-23 Thread Nicholas Piggin
On Fri Jan 20, 2023 at 5:43 PM AEST, Andrew Donnellan wrote: > From: Russell Currey > > The pseries platform can support dynamic secure boot (i.e. secure boot > using user-defined keys) using variables contained with the PowerVM LPAR > Platform KeyStore (PLPKS). Using the powerpc secvar API,

Re: [PATCH v2 0/9] jevents/pmu-events improvements

2023-01-23 Thread Ian Rogers
On Mon, Jan 23, 2023 at 5:26 AM John Garry wrote: > > On 21/12/2022 22:34, 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

Re: [PATCH v2 8/9] perf jevents: Generate metrics and events as separate tables

2023-01-23 Thread Ian Rogers
On Mon, Jan 23, 2023 at 7:18 AM John Garry wrote: > > On 21/12/2022 22:34, Ian Rogers wrote: > > Turn a perf json event into an event, metric or both. This reduces the > > number of events needed to scan to find an event or metric. As events > > no longer need the relatively seldom used metric

Re: [PATCH v2 7/9] perf pmu-events: Introduce pmu_metrics_table

2023-01-23 Thread Ian Rogers
On Mon, Jan 23, 2023 at 7:36 AM John Garry wrote: > > On 21/12/2022 22:34, Ian Rogers wrote: > > Add a metrics table that is just a cast from pmu_events_table. This > > changes the APIs so that event and metric usage of the underlying > > table is different. Later changes will separate the

Re: [PATCH v4 21/24] powerpc/pseries: Pass PLPKS password on kexec

2023-01-23 Thread Andrew Donnellan
On Tue, 2023-01-24 at 14:36 +1000, Nicholas Piggin wrote: > > > +   prop = of_find_property(of_chosen, "ibm,plpks-pw", ); > > +   if (prop) { > > +   ospasswordlength = (u16)len; > > +   ospassword = kzalloc(ospasswordlength, GFP_KERNEL); > > +   if

Re: [PATCH v2 4/9] perf pmu-events: Separate metric out of pmu_event

2023-01-23 Thread Ian Rogers
On Mon, Jan 23, 2023 at 7:16 AM John Garry wrote: > > On 21/12/2022 22:34, Ian Rogers wrote: > > Previously both events and metrics were encoded in struct > > pmu_event. Create a new pmu_metric that has the metric related > > variables and remove these from pmu_event. Add iterators for > >

Re: [PATCH v4 21/24] powerpc/pseries: Pass PLPKS password on kexec

2023-01-23 Thread Nicholas Piggin
On Fri Jan 20, 2023 at 5:43 PM AEST, Andrew Donnellan wrote: > From: Russell Currey > > Before interacting with the PLPKS, we ask the hypervisor to generate a > password for the current boot, which is then required for most further > PLPKS operations. > > If we kexec into a new kernel, the new

Re: [PATCH v4 19/24] powerpc/pseries: Turn PSERIES_PLPKS into a hidden option

2023-01-23 Thread Nicholas Piggin
On Fri Jan 20, 2023 at 5:43 PM AEST, Andrew Donnellan wrote: > It seems a bit unnecessary for the PLPKS code to have a user-visible > config option when it doesn't do anything on its own, and there's existing > options for enabling Secure Boot-related features. > > It should be enabled by

Re: [PATCH v4 16/24] powerpc/pseries: Implement signed update for PLPKS objects

2023-01-23 Thread Nicholas Piggin
On Fri Jan 20, 2023 at 5:42 PM AEST, Andrew Donnellan wrote: > From: Nayna Jain > > The Platform Keystore provides a signed update interface which can be used > to create, replace or append to certain variables in the PKS in a secure > fashion, with the hypervisor requiring that the update be

Re: [PATCH v6 3/5] lazy tlb: shoot lazies, non-refcounting lazy tlb mm reference handling scheme

2023-01-23 Thread Nicholas Piggin
On Mon Jan 23, 2023 at 6:16 PM AEST, Nadav Amit wrote: > > > On 1/19/23 6:22 AM, Nicholas Piggin wrote: > > On Thu Jan 19, 2023 at 8:22 AM AEST, Nadav Amit wrote: > >> > >> > >>> On Jan 18, 2023, at 12:00 AM, Nicholas Piggin wrote: > >>> > >>> +static void do_shoot_lazy_tlb(void *arg) > >>> +{ >

[PATCH v3 4/5] dt-bindings: usb: Convert Marvell Orion EHCI to DT schema

2023-01-23 Thread Rob Herring
The Marvell Orion EHCI binding is just some compatible strings, so add it to the generic-ehci.yaml schema. Signed-off-by: Rob Herring --- .../devicetree/bindings/usb/ehci-orion.txt | 22 -- .../devicetree/bindings/usb/generic-ehci.yaml | 2 ++ 2 files changed,

[PATCH v3 2/5] dt-bindings: usb: Convert multiple "usb-ohci" bindings to DT schema

2023-01-23 Thread Rob Herring
"usb-ohci" is another "generic" OHCI controller compatible string used by several platforms. Add it to the generic-ohci.yaml schema and remove all the old binding docs. Marvell pxa-usb.txt has "usb-ohci" in the example, but actual users don't, so drop it. Signed-off-by: Rob Herring --- v2: -

[PATCH v3 5/5] dt-bindings: usb: Convert Nuvoton EHCI to DT schema

2023-01-23 Thread Rob Herring
The Nuvoton EHCI binding is just some compatible strings, so add it to the generic-ehci.yaml schema. Signed-off-by: Rob Herring --- .../devicetree/bindings/usb/generic-ehci.yaml| 2 ++ .../devicetree/bindings/usb/npcm7xx-usb.txt | 20 2 files changed, 2

[PATCH v3 1/5] dt-bindings: usb: Remove obsolete brcm,bcm3384-usb.txt

2023-01-23 Thread Rob Herring
The "brcm,bcm3384-ohci" and "brcm,bcm3384-ehci" compatibles are already documented in generic-ohci.yaml and generic-ehci.yaml, respectively, so remove the old txt binding. Signed-off-by: Rob Herring --- Documentation/devicetree/bindings/usb/brcm,bcm3384-usb.txt | 11 --- 1 file changed,

[PATCH v3 3/5] dt-bindings: usb: Convert OMAP OHCI/EHCI bindings to schema

2023-01-23 Thread Rob Herring
The OMAP OHCI and EHCI USB host bindings follow the generic binding, so add the compatibles and remove the old txt binding docs. The examples in omap-usb-host.txt don't match actual users, so update them dropping the fallback compatible. Signed-off-by: Rob Herring --- v3: - Fix document

[PATCH v3 0/5] dt-bindings: usb: Convert some more simple OHCI/EHCI bindings

2023-01-23 Thread Rob Herring
The 'ohci-usb' compatible is another 'generic' compatible for OHCI, but isn't documented with a schema. Let's add it to generic-ohci.yaml schema. While looking at this, I found a few other USB host bindings which are simple enough to use the 'generic' schemas. Signed-off-by: Rob Herring ---

Re: [PATCH] ps3vram: remove bio splitting

2023-01-23 Thread Jens Axboe
On Mon, 23 Jan 2023 08:47:18 +0100, Christoph Hellwig wrote: > ps3vram iterates over the bio one segment, that is page aligned and max > page sized chunk, a time. Because of that there is no point in > calling bio_split_to_limits, or explicitly setting the default limits > that are only used by

Re: [PATCH v6 2/5] lazy tlb: allow lazy tlb mm refcounting to be configurable

2023-01-23 Thread Nicholas Piggin
On Mon Jan 23, 2023 at 6:02 PM AEST, Nadav Amit wrote: > > > On 1/23/23 9:35 AM, Nadav Amit wrote: > >> +    if (IS_ENABLED(CONFIG_MMU_LAZY_TLB_REFCOUNT)) { > >> +    mmdrop(mm); > >> +    } else { > >> +    /* > >> + * mmdrop_lazy_tlb must provide a full memory barrier, see the >

Re: [PATCH] ps3vram: remove bio splitting

2023-01-23 Thread Geoff Levand
Hi Christoph, On 1/22/23 23:47, Christoph Hellwig wrote: > ps3vram iterates over the bio one segment, that is page aligned and max > page sized chunk, a time. Because of that there is no point in > calling bio_split_to_limits, or explicitly setting the default limits > that are only used by

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Liam R. Howlett
* Michal Hocko [230123 15:00]: > On Mon 23-01-23 19:30:43, Matthew Wilcox wrote: > > On Mon, Jan 23, 2023 at 08:18:37PM +0100, Michal Hocko wrote: > > > On Mon 23-01-23 18:23:08, Matthew Wilcox wrote: > > > > On Mon, Jan 23, 2023 at 09:46:20AM -0800, Suren Baghdasaryan wrote: > > > [...] > > > >

Re: [PATCH v2 0/8] powerpc/85xx: p2020: Create one unified machine description

2023-01-23 Thread Pali Rohár
On Monday 23 January 2023 14:32:36 Christophe Leroy wrote: > Le 22/01/2023 à 12:16, Pali Rohár a écrit : > > Hello! Do you have any comments for this patch series? > > > I think patches 1 and 2 could be a single patch. Well, if you want to have them in single patch, it could be easily squashed

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Suren Baghdasaryan
On Mon, Jan 23, 2023 at 12:00 PM Michal Hocko wrote: > > On Mon 23-01-23 19:30:43, Matthew Wilcox wrote: > > On Mon, Jan 23, 2023 at 08:18:37PM +0100, Michal Hocko wrote: > > > On Mon 23-01-23 18:23:08, Matthew Wilcox wrote: > > > > On Mon, Jan 23, 2023 at 09:46:20AM -0800, Suren Baghdasaryan

Re: [PATCH v2 4/9] perf pmu-events: Separate metric out of pmu_event

2023-01-23 Thread John Garry
On 21/12/2022 22:34, Ian Rogers wrote: Previously both events and metrics were encoded in struct pmu_event. Create a new pmu_metric that has the metric related variables and remove these from pmu_event. Add iterators for pmu_metric and use in places that metrics are desired rather than events.

Re: [PATCH v2 7/9] perf pmu-events: Introduce pmu_metrics_table

2023-01-23 Thread John Garry
On 21/12/2022 22:34, Ian Rogers wrote: Add a metrics table that is just a cast from pmu_events_table. This changes the APIs so that event and metric usage of the underlying table is different. Later changes will separate the tables. This introduction fixes a NO_JEVENTS=1 regression on: 68:

Re: [PATCH v2 8/9] perf jevents: Generate metrics and events as separate tables

2023-01-23 Thread John Garry
On 21/12/2022 22:34, Ian Rogers wrote: Turn a perf json event into an event, metric or both. This reduces the number of events needed to scan to find an event or metric. As events no longer need the relatively seldom used metric fields, 4 bytes is saved per event. This reduces the big C string's

Re: [PATCH v2 0/9] jevents/pmu-events improvements

2023-01-23 Thread John Garry
On 21/12/2022 22:34, 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: "PM_CMPLU_STALL / PM_RUN_INST_CMPL -

Re: [PATCH v2 5/9] perf stat: Remove evsel metric_name/expr

2023-01-23 Thread John Garry
On 21/12/2022 22:34, Ian Rogers wrote: Metrics are their own unit and these variables held broken metrics previously and now just hold the value NULL. Remove code that used these variables. Signed-off-by: Ian Rogers Reviewed-by: John Garry

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Michal Hocko
On Mon 23-01-23 19:30:43, Matthew Wilcox wrote: > On Mon, Jan 23, 2023 at 08:18:37PM +0100, Michal Hocko wrote: > > On Mon 23-01-23 18:23:08, Matthew Wilcox wrote: > > > On Mon, Jan 23, 2023 at 09:46:20AM -0800, Suren Baghdasaryan wrote: > > [...] > > > > Yes, batching the vmas into a list and

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Suren Baghdasaryan
On Mon, Jan 23, 2023 at 11:31 AM Matthew Wilcox wrote: > > On Mon, Jan 23, 2023 at 08:18:37PM +0100, Michal Hocko wrote: > > On Mon 23-01-23 18:23:08, Matthew Wilcox wrote: > > > On Mon, Jan 23, 2023 at 09:46:20AM -0800, Suren Baghdasaryan wrote: > > [...] > > > > Yes, batching the vmas into a

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Matthew Wilcox
On Mon, Jan 23, 2023 at 08:18:37PM +0100, Michal Hocko wrote: > On Mon 23-01-23 18:23:08, Matthew Wilcox wrote: > > On Mon, Jan 23, 2023 at 09:46:20AM -0800, Suren Baghdasaryan wrote: > [...] > > > Yes, batching the vmas into a list and draining it in remove_mt() and > > > exit_mmap() as you

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Michal Hocko
On Mon 23-01-23 18:23:08, Matthew Wilcox wrote: > On Mon, Jan 23, 2023 at 09:46:20AM -0800, Suren Baghdasaryan wrote: [...] > > Yes, batching the vmas into a list and draining it in remove_mt() and > > exit_mmap() as you suggested makes sense to me and is quite simple. > > Let's do that if nobody

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Suren Baghdasaryan
On Mon, Jan 23, 2023 at 10:23 AM Matthew Wilcox wrote: > > On Mon, Jan 23, 2023 at 09:46:20AM -0800, Suren Baghdasaryan wrote: > > On Mon, Jan 23, 2023 at 9:16 AM Michal Hocko wrote: > > > > > > On Mon 23-01-23 09:07:34, Suren Baghdasaryan wrote: > > > > On Mon, Jan 23, 2023 at 8:55 AM Michal

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Matthew Wilcox
On Mon, Jan 23, 2023 at 09:46:20AM -0800, Suren Baghdasaryan wrote: > On Mon, Jan 23, 2023 at 9:16 AM Michal Hocko wrote: > > > > On Mon 23-01-23 09:07:34, Suren Baghdasaryan wrote: > > > On Mon, Jan 23, 2023 at 8:55 AM Michal Hocko wrote: > > > > > > > > On Mon 23-01-23 08:22:53, Suren

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Suren Baghdasaryan
On Mon, Jan 23, 2023 at 9:16 AM Michal Hocko wrote: > > On Mon 23-01-23 09:07:34, Suren Baghdasaryan wrote: > > On Mon, Jan 23, 2023 at 8:55 AM Michal Hocko wrote: > > > > > > On Mon 23-01-23 08:22:53, Suren Baghdasaryan wrote: > > > > On Mon, Jan 23, 2023 at 1:56 AM Michal Hocko wrote: > > > >

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Suren Baghdasaryan
On Mon, Jan 23, 2023 at 1:59 AM 'Michal Hocko' via kernel-team wrote: > > On Fri 20-01-23 08:20:43, Suren Baghdasaryan wrote: > > On Fri, Jan 20, 2023 at 12:52 AM Michal Hocko wrote: > > > > > > On Thu 19-01-23 10:52:03, Suren Baghdasaryan wrote: > > > > On Thu, Jan 19, 2023 at 4:59 AM Michal

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Michal Hocko
On Mon 23-01-23 09:07:34, Suren Baghdasaryan wrote: > On Mon, Jan 23, 2023 at 8:55 AM Michal Hocko wrote: > > > > On Mon 23-01-23 08:22:53, Suren Baghdasaryan wrote: > > > On Mon, Jan 23, 2023 at 1:56 AM Michal Hocko wrote: > > > > > > > > On Fri 20-01-23 09:50:01, Suren Baghdasaryan wrote: > >

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Suren Baghdasaryan
On Mon, Jan 23, 2023 at 8:55 AM Michal Hocko wrote: > > On Mon 23-01-23 08:22:53, Suren Baghdasaryan wrote: > > On Mon, Jan 23, 2023 at 1:56 AM Michal Hocko wrote: > > > > > > On Fri 20-01-23 09:50:01, Suren Baghdasaryan wrote: > > > > On Fri, Jan 20, 2023 at 9:32 AM Matthew Wilcox > > > >

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Michal Hocko
On Mon 23-01-23 08:22:53, Suren Baghdasaryan wrote: > On Mon, Jan 23, 2023 at 1:56 AM Michal Hocko wrote: > > > > On Fri 20-01-23 09:50:01, Suren Baghdasaryan wrote: > > > On Fri, Jan 20, 2023 at 9:32 AM Matthew Wilcox > > > wrote: > > [...] > > > > The page fault handler (or whatever other

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Suren Baghdasaryan
On Mon, Jan 23, 2023 at 1:56 AM Michal Hocko wrote: > > On Fri 20-01-23 09:50:01, Suren Baghdasaryan wrote: > > On Fri, Jan 20, 2023 at 9:32 AM Matthew Wilcox wrote: > [...] > > > The page fault handler (or whatever other reader -- ptrace, proc, etc) > > > should have a refcount on the

Re: [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS

2023-01-23 Thread Nathan Chancellor
Hi Naresh, On Mon, Jan 23, 2023 at 07:28:10PM +0530, Naresh Kamboju wrote: > FYI, > [ please provide comments, feedback and improvements on build/ ltp smoke > tests ] > > LKFT test farm have fetched your patch series [1] > [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS

Re: [PATCH v2 07/14] powerpc/vdso: Improve linker flags

2023-01-23 Thread Segher Boessenkool
Hi! On Wed, Jan 11, 2023 at 08:05:04PM -0700, Nathan Chancellor wrote: > When clang's -Qunused-arguments is dropped from KBUILD_CPPFLAGS, there > are several warnings in the PowerPC vDSO: > > clang-16: error: -Wl,-soname=linux-vdso32.so.1: 'linker' input unused >

Re: [PATCH v2 0/8] powerpc/85xx: p2020: Create one unified machine description

2023-01-23 Thread Christophe Leroy
Le 22/01/2023 à 12:16, Pali Rohár a écrit : > Hello! Do you have any comments for this patch series? I think patches 1 and 2 could be a single patch. I'm having hard time understanding how things are built. Patch 3 introduces 273 lines of new code in a file named p2020.c while only removing

Re: [PATCH v2 00/14] Remove clang's -Qunused-arguments from KBUILD_CPPFLAGS

2023-01-23 Thread Naresh Kamboju
Hi Nathan, On Thu, 12 Jan 2023 at 08:35, Nathan Chancellor wrote: > > Hi all, > > Clang can emit a few different warnings when it encounters a flag that it > recognizes but does not support internally. These warnings are elevated to > errors within {as,cc}-option via -Werror to catch unsupported

[PATCH] powerpc: Check !irq instead of irq == NO_IRQ and remove NO_IRQ

2023-01-23 Thread Christophe Leroy
NO_IRQ is a relic from the old days. It is not used anymore in core functions. By the way, function irq_of_parse_and_map() returns value 0 on error. In some drivers, NO_IRQ is erroneously used to check the return of irq_of_parse_and_map(). It is not a real bug today because the only

Re: [PATCH v3 01/10] dt-bindings: soc: fsl: cpm_qe: Add TSA controller

2023-01-23 Thread Herve Codina
Hi Rob, On Tue, 17 Jan 2023 08:55:29 -0600 Rob Herring wrote: > On Fri, Jan 13, 2023 at 11:37:50AM +0100, Herve Codina wrote: > > Add support for the time slot assigner (TSA) > > available in some PowerQUICC SoC such as MPC885 > > or MPC866. > > An odd line wrap length... Will be changed

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Michal Hocko
On Fri 20-01-23 09:50:01, Suren Baghdasaryan wrote: > On Fri, Jan 20, 2023 at 9:32 AM Matthew Wilcox wrote: [...] > > The page fault handler (or whatever other reader -- ptrace, proc, etc) > > should have a refcount on the mm_struct, so we can't be in this path > > trying to free VMAs. Right? >

Re: [PATCH 39/41] kernel/fork: throttle call_rcu() calls in vm_area_free

2023-01-23 Thread Michal Hocko
On Fri 20-01-23 08:20:43, Suren Baghdasaryan wrote: > On Fri, Jan 20, 2023 at 12:52 AM Michal Hocko wrote: > > > > On Thu 19-01-23 10:52:03, Suren Baghdasaryan wrote: > > > On Thu, Jan 19, 2023 at 4:59 AM Michal Hocko wrote: > > > > > > > > On Mon 09-01-23 12:53:34, Suren Baghdasaryan wrote: > >

Re: [PATCH v6 3/5] lazy tlb: shoot lazies, non-refcounting lazy tlb mm reference handling scheme

2023-01-23 Thread Nadav Amit
On 1/19/23 6:22 AM, Nicholas Piggin wrote: On Thu Jan 19, 2023 at 8:22 AM AEST, Nadav Amit wrote: On Jan 18, 2023, at 12:00 AM, Nicholas Piggin wrote: +static void do_shoot_lazy_tlb(void *arg) +{ + struct mm_struct *mm = arg; + + if (current->active_mm == mm) { +

Re: [PATCH v6 2/5] lazy tlb: allow lazy tlb mm refcounting to be configurable

2023-01-23 Thread Nadav Amit
On 1/23/23 9:35 AM, Nadav Amit wrote: +    if (IS_ENABLED(CONFIG_MMU_LAZY_TLB_REFCOUNT)) { +    mmdrop(mm); +    } else { +    /* + * mmdrop_lazy_tlb must provide a full memory barrier, see the + * membarrier comment finish_task_switch which relies on this. +