[RFC PATCH v4 01/17] powerpc/trace: Account for -fpatchable-function-entry support by toolchain

2024-07-14 Thread Naveen N Rao
So far, we have relied on the fact that gcc supports both -mprofile-kernel, as well as -fpatchable-function-entry, and clang supports neither. Our Makefile only checks for CONFIG_MPROFILE_KERNEL to decide which files to build. Clang has a feature request out [*] to implement

Re: [RFC PATCH 2/7] mm: vmalloc: don't account for number of nodes for HUGE_VMAP allocations

2024-04-14 Thread Mike Rapoport
w bpf_prog_pack, while it could do with PMD_SIZE'ed packs. > > > > Don't account for number of nodes for VM_ALLOW_HUGE_VMAP with > > NUMA_NO_NODE and use huge pages whenever the requested allocation size > > is larger than PMD_SIZE. > > Patch looks ok but message is confu

Re: [RFC PATCH 2/7] mm: vmalloc: don't account for number of nodes for HUGE_VMAP allocations

2024-04-12 Thread Christophe Leroy
ed memory is not distributed between nodes and > there is no advantage in such approach. > On the contrary, BPF allocates PMD_SIZE * num_possible_nodes() for each > new bpf_prog_pack, while it could do with PMD_SIZE'ed packs. > > Don't account for number of nodes for VM_ALLOW_HUGE_

[RFC PATCH 2/7] mm: vmalloc: don't account for number of nodes for HUGE_VMAP allocations

2024-04-11 Thread Mike Rapoport
h approach. On the contrary, BPF allocates PMD_SIZE * num_possible_nodes() for each new bpf_prog_pack, while it could do with PMD_SIZE'ed packs. Don't account for number of nodes for VM_ALLOW_HUGE_VMAP with NUMA_NO_NODE and use huge pages whenever the requested allocation size is larger than PMD_SIZE.

Re: [PATCH v2] vhost-vdpa: account iommu allocations

2023-12-26 Thread David Rientjes
On Tue, 26 Dec 2023, Pasha Tatashin wrote: > iommu allocations should be accounted in order to allow admins to > monitor and limit the amount of iommu memory. > > Signed-off-by: Pasha Tatashin > Acked-by: Michael S. Tsirkin Acked-by: David Rientjes

[PATCH v2] vhost-vdpa: account iommu allocations

2023-12-26 Thread Pasha Tatashin
iommu allocations should be accounted in order to allow admins to monitor and limit the amount of iommu memory. Signed-off-by: Pasha Tatashin Acked-by: Michael S. Tsirkin --- drivers/vhost/vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Changelog: v1: This patch is spinned of

[PATCH v2 2/5] sched: Take cpufreq feedback into account

2023-12-21 Thread Vincent Guittot
unsigned long cur_delta, base_energy; @@ -7962,18 +7971,17 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu) if (cpumask_empty(cpus)) continue; - /* Account thermal pressure for the energy estimation */ +

Re: [PATCH 2/4] sched: Take cpufreq feedback into account

2023-12-15 Thread Lukasz Luba
ong rq_util_min, rq_util_max; unsigned long cur_delta, base_energy; @@ -7962,18 +7969,17 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu) if (cpumask_empty(cpus)) continue; - /* Account thermal pressure for the energy

[PATCH 2/4] sched: Take cpufreq feedback into account

2023-12-12 Thread Vincent Guittot
,18 +7969,17 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu) if (cpumask_empty(cpus)) continue; - /* Account thermal pressure for the energy estimation */ + /* Account external pressure for the en

[PATCH] vhost-vdpa: account iommu allocations

2023-11-30 Thread Pasha Tatashin
iommu allocations should be accounted in order to allow admins to monitor and limit the amount of iommu memory. Signed-off-by: Pasha Tatashin --- drivers/vhost/vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) This patch is spinned of from the series:

Re: [PATCH v2 0/3] KVM: Properly account for guest CPU time

2021-04-15 Thread Sean Christopherson
On Thu, Apr 15, 2021, Wanpeng Li wrote: > On Thu, 15 Apr 2021 at 08:49, Sean Christopherson wrote: > > > > On Wed, Apr 14, 2021, Wanpeng Li wrote: > > > On Wed, 14 Apr 2021 at 01:25, Sean Christopherson > > > wrote: > > > > > > > > On Tue, Apr 13, 2021, Wanpeng Li wrote: > > > > > The bugzilla

Re: [PATCH v2 0/3] KVM: Properly account for guest CPU time

2021-04-14 Thread Wanpeng Li
On Thu, 15 Apr 2021 at 08:49, Sean Christopherson wrote: > > On Wed, Apr 14, 2021, Wanpeng Li wrote: > > On Wed, 14 Apr 2021 at 01:25, Sean Christopherson wrote: > > > > > > On Tue, Apr 13, 2021, Wanpeng Li wrote: > > > > The bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=209831 > > > >

Re: [PATCH v2 0/3] KVM: Properly account for guest CPU time

2021-04-14 Thread Sean Christopherson
On Wed, Apr 14, 2021, Wanpeng Li wrote: > On Wed, 14 Apr 2021 at 01:25, Sean Christopherson wrote: > > > > On Tue, Apr 13, 2021, Wanpeng Li wrote: > > > The bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=209831 > > > reported that the guest time remains 0 when running a while true > > >

Re: [PATCH v2 0/3] KVM: Properly account for guest CPU time

2021-04-14 Thread Wanpeng Li
On Wed, 14 Apr 2021 at 01:25, Sean Christopherson wrote: > > On Tue, Apr 13, 2021, Wanpeng Li wrote: > > The bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=209831 > > reported that the guest time remains 0 when running a while true > > loop in the guest. > > > > The commit 87fa7f3e98a131

[v2 PATCH 4/7] mm: migrate: account THP NUMA migration counters correctly

2021-04-13 Thread Yang Shi
Now both base page and THP NUMA migration is done via migrate_misplaced_page(), keep the counters correctly for THP. Signed-off-by: Yang Shi --- mm/migrate.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 333448aa53f1..a473f25fbd01

Re: [PATCH v2 0/3] KVM: Properly account for guest CPU time

2021-04-13 Thread Sean Christopherson
On Tue, Apr 13, 2021, Wanpeng Li wrote: > The bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=209831 > reported that the guest time remains 0 when running a while true > loop in the guest. > > The commit 87fa7f3e98a131 ("x86/kvm: Move context tracking where it > belongs") moves

Re: [PATCH v2 0/3] KVM: Properly account for guest CPU time

2021-04-13 Thread Christian Borntraeger
On 13.04.21 09:16, Wanpeng Li wrote: The bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=209831 reported that the guest time remains 0 when running a while true loop in the guest. The commit 87fa7f3e98a131 ("x86/kvm: Move context tracking where it belongs") moves guest_exit_irqoff()

[PATCH v2 0/3] KVM: Properly account for guest CPU time

2021-04-13 Thread Wanpeng Li
The bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=209831 reported that the guest time remains 0 when running a while true loop in the guest. The commit 87fa7f3e98a131 ("x86/kvm: Move context tracking where it belongs") moves guest_exit_irqoff() close to vmexit breaks the tick-based time

[PATCH v7 04/28] mm/vmstat: Add functions to account folio statistics

2021-04-09 Thread Matthew Wilcox (Oracle)
Allow page counters to be more readily modified by callers which have a folio. Name these wrappers with 'stat' instead of 'state' as requested by Linus here: https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xffgiwpgthvm7djwgdi4cvr...@mail.gmail.com/ Signed-off-by: Matthew Wilcox

Re: [PATCH v1 0/5] cpuidle: Take possible negative "sleep length" values into account

2021-04-07 Thread Rafael J. Wysocki
as to avoid > mishandling negative "sleep length" values (patch [4/5]). > > Finally, make the menu governor take negative "sleep length" values into > account properly (patch [5/5]). > > Please see the changelogs of the patches for details. Given no objections or concerns regarding this lot, let me queue it up. Thanks!

Re: [PATCH] platform/x86: ISST: Account for increased timeout in some cases

2021-04-07 Thread Hans de Goede
Hi, On 3/31/21 12:08 AM, Srinivas Pandruvada wrote: > In some cases when firmware is busy or updating, some mailbox commands > still timeout on some newer CPUs. To fix this issue, change how we > process timeout. > > With this change, replaced timeout from using simple count with real > timeout

Re: [PATCH] KVM: X86: Properly account for guest CPU time when considering context tracking

2021-04-06 Thread Sean Christopherson
On Tue, Mar 30, 2021, Wanpeng Li wrote: > On Tue, 30 Mar 2021 at 01:15, Sean Christopherson wrote: > > > > +Thomas > > > > On Mon, Mar 29, 2021, Wanpeng Li wrote: > > > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c > > > index 32cf828..85695b3 100644 > > > ---

Re: [PATCH v6 03/27] mm/vmstat: Add functions to account folio statistics

2021-04-06 Thread Christoph Hellwig
On Wed, Mar 31, 2021 at 07:47:04PM +0100, Matthew Wilcox (Oracle) wrote: > Allow page counters to be more readily modified by callers which have > a folio. Name these wrappers with 'stat' instead of 'state' as requested > by Linus here: Looks good, Reviewed-by: Christoph Hellwig

[RFC PATCH v1 03/11] mm: Account the top tier memory usage per cgroup

2021-04-05 Thread Tim Chen
For each memory cgroup, account its usage of the top tier memory at the time a top tier page is assigned and uncharged from the cgroup. Signed-off-by: Tim Chen --- include/linux/memcontrol.h | 1 + mm/memcontrol.c| 39 +- 2 files changed, 39

[RFC PATCH v1 07/11] mm: Account the total top tier memory in use

2021-04-05 Thread Tim Chen
Track the global top tier memory usage stats. They are used as the basis of deciding when to start demoting pages from memory cgroups that have exceeded their soft limit. We start reclaiming top tier memory when the total top tier memory is low. Signed-off-by: Tim Chen ---

Re: [PATCH 5/6] clk: qcom: gcc-sdm660: Account for needed adjustments in probe function

2021-04-01 Thread Konrad Dybcio
+ + /* Keep bimc gfx clock port on all the time */ + clk_prepare_enable(gcc_bimc_gfx_clk.clkr.hw.clk); + >>> Preferably just set these various bits with regmap_update_bits() during >>> probe. Also, please do it before regsitering the clks, not after. >> To be

Re: [PATCH 5/6] clk: qcom: gcc-sdm660: Account for needed adjustments in probe function

2021-03-31 Thread Stephen Boyd
Quoting Konrad Dybcio (2021-02-25 11:09:14) > Hi and sorry for the late reply, > I'm sorry too. This fell off my review queue for some time. > > >> + > >> + /* Keep bimc gfx clock port on all the time */ > >> + clk_prepare_enable(gcc_bimc_gfx_clk.clkr.hw.clk); > >> + > > Preferably

[PATCH v6 03/27] mm/vmstat: Add functions to account folio statistics

2021-03-31 Thread Matthew Wilcox (Oracle)
Allow page counters to be more readily modified by callers which have a folio. Name these wrappers with 'stat' instead of 'state' as requested by Linus here: https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xffgiwpgthvm7djwgdi4cvr...@mail.gmail.com/ Signed-off-by: Matthew Wilcox

Re: [PATCH 2/2] KVM: x86: Account a variety of miscellaneous allocations

2021-03-31 Thread Paolo Bonzini
On 31/03/21 04:30, Sean Christopherson wrote: Switch to GFP_KERNEL_ACCOUNT for a handful of allocations that are clearly associated with a single task/VM. Note, there are a several SEV allocations that aren't accounted, but those can (hopefully) be fixed by using the local stack for memory.

Re: [PATCH 1/2] KVM: Account memory allocations for 'struct kvm_vcpu'

2021-03-30 Thread Wanpeng Li
On Wed, 31 Mar 2021 at 11:24, Sean Christopherson wrote: > > On Wed, Mar 31, 2021, Wanpeng Li wrote: > > On Wed, 31 Mar 2021 at 10:32, Sean Christopherson wrote: > > > > > > Use GFP_KERNEL_ACCOUNT for the vCPU allocations, the vCPUs are very much > > > tied to a single task/VM. For x86, the

Re: [PATCH 1/2] KVM: Account memory allocations for 'struct kvm_vcpu'

2021-03-30 Thread Sean Christopherson
On Wed, Mar 31, 2021, Wanpeng Li wrote: > On Wed, 31 Mar 2021 at 10:32, Sean Christopherson wrote: > > > > Use GFP_KERNEL_ACCOUNT for the vCPU allocations, the vCPUs are very much > > tied to a single task/VM. For x86, the allocations were accounted up > > until the allocation code was moved to

Re: [PATCH 1/2] KVM: Account memory allocations for 'struct kvm_vcpu'

2021-03-30 Thread Wanpeng Li
On Wed, 31 Mar 2021 at 10:32, Sean Christopherson wrote: > > Use GFP_KERNEL_ACCOUNT for the vCPU allocations, the vCPUs are very much > tied to a single task/VM. For x86, the allocations were accounted up > until the allocation code was moved to common KVM. For all other > architectures, vCPU

[PATCH 2/2] KVM: x86: Account a variety of miscellaneous allocations

2021-03-30 Thread Sean Christopherson
Switch to GFP_KERNEL_ACCOUNT for a handful of allocations that are clearly associated with a single task/VM. Note, there are a several SEV allocations that aren't accounted, but those can (hopefully) be fixed by using the local stack for memory. Signed-off-by: Sean Christopherson ---

[PATCH 1/2] KVM: Account memory allocations for 'struct kvm_vcpu'

2021-03-30 Thread Sean Christopherson
Use GFP_KERNEL_ACCOUNT for the vCPU allocations, the vCPUs are very much tied to a single task/VM. For x86, the allocations were accounted up until the allocation code was moved to common KVM. For all other architectures, vCPU allocations were never previously accounted, but only because most

[PATCH] platform/x86: ISST: Account for increased timeout in some cases

2021-03-30 Thread Srinivas Pandruvada
In some cases when firmware is busy or updating, some mailbox commands still timeout on some newer CPUs. To fix this issue, change how we process timeout. With this change, replaced timeout from using simple count with real timeout in micro-seconds using ktime. When the command response takes

Re: [PATCH v1 5/5] cpuidle: menu: Take negative "sleep length" values into account

2021-03-30 Thread Rafael J. Wysocki
On Tue, Mar 30, 2021 at 4:00 AM Zhou Ti (x2019cwm) wrote: > > On Mon 2021-03-29 14:37 Rafael J. Wysocki wrote: > > Make the menu governor check the tick_nohz_get_next_hrtimer() > > return value so as to avoid dealing with negative "sleep length" > > values and make it use that value directly when

Re: [PATCH v1 5/5] cpuidle: menu: Take negative "sleep length" values into account

2021-03-29 Thread Zhou Ti (x2019cwm)
On Mon 2021-03-29 14:37 Rafael J. Wysocki wrote: > Make the menu governor check the tick_nohz_get_next_hrtimer() > return value so as to avoid dealing with negative "sleep length" > values and make it use that value directly when the tick is stopped. > > While at it, rename local variable

Re: [PATCH] KVM: X86: Properly account for guest CPU time when considering context tracking

2021-03-29 Thread Wanpeng Li
On Tue, 30 Mar 2021 at 01:15, Sean Christopherson wrote: > > +Thomas > > On Mon, Mar 29, 2021, Wanpeng Li wrote: > > From: Wanpeng Li > > > > The bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=209831 > > reported that the guest time remains 0 when running a while true > > loop in the

[PATCH v1 0/5] cpuidle: Take possible negative "sleep length" values into account

2021-03-29 Thread Rafael J. Wysocki
(patch [2/5]). Next, adjust the teo governor a bit so that negative "sleep length" values are counted like zero by it (patch [3/5]) and modify it so as to avoid mishandling negative "sleep length" values (patch [4/5]). Finally, make the menu governor take negative "sleep le

[PATCH v1 4/5] cpuidle: teo: Take negative "sleep length" values into account

2021-03-29 Thread Rafael J. Wysocki
From: "Rafael J. Wysocki" Modify the TEO governor to take possible negative return values of tick_nohz_get_next_hrtimer() into account by changing the data type of some variables used by it to s64 which allows it to carry out computations without potentially problematic data type c

[PATCH v1 5/5] cpuidle: menu: Take negative "sleep length" values into account

2021-03-29 Thread Rafael J. Wysocki
From: "Rafael J. Wysocki" Subject: [PATCH] cpuidle: menu: Take negative "sleep length" values into account Make the menu governor check the tick_nohz_get_next_hrtimer() return value so as to avoid dealing with negative "sleep length" values and make it use tha

Re: [PATCH] KVM: X86: Properly account for guest CPU time when considering context tracking

2021-03-29 Thread Sean Christopherson
+Thomas On Mon, Mar 29, 2021, Wanpeng Li wrote: > From: Wanpeng Li > > The bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=209831 > reported that the guest time remains 0 when running a while true > loop in the guest. > > The commit 87fa7f3e98a131 ("x86/kvm: Move context tracking where

[PATCH] KVM: X86: Properly account for guest CPU time when considering context tracking

2021-03-29 Thread Wanpeng Li
From: Wanpeng Li The bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=209831 reported that the guest time remains 0 when running a while true loop in the guest. The commit 87fa7f3e98a131 ("x86/kvm: Move context tracking where it belongs") moves guest_exit_irqoff() close to vmexit breaks

[PATCH v5 06/27] mm/vmstat: Add functions to account folio statistics

2021-03-19 Thread Matthew Wilcox (Oracle)
Allow page counters to be more readily modified by callers which have a folio. Name these wrappers with 'stat' instead of 'state' as requested by Linus here: https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xffgiwpgthvm7djwgdi4cvr...@mail.gmail.com/ Signed-off-by: Matthew Wilcox

Re: [PATCH] x86/cpu/AMD: Adjust x86_phys_bits to account for reduced PA in SEV-* guests

2021-03-17 Thread Peter Gonda
On Wed, Mar 17, 2021 at 3:19 PM Sean Christopherson wrote: > > On Wed, Mar 17, 2021, Sean Christopherson wrote: > > On Wed, Mar 17, 2021, Borislav Petkov wrote: > > > IOW, you have c_bit so your valid address space is [0 .. c_bit-1] no? > > > > I haven't found anything in the GHCB that dictates

Re: [PATCH] x86/cpu/AMD: Adjust x86_phys_bits to account for reduced PA in SEV-* guests

2021-03-17 Thread Sean Christopherson
On Wed, Mar 17, 2021, Sean Christopherson wrote: > On Wed, Mar 17, 2021, Borislav Petkov wrote: > > IOW, you have c_bit so your valid address space is [0 .. c_bit-1] no? > > I haven't found anything in the GHCB that dictates that MAXPHYADDR == C_BIT-1, > or more specifically that MAXPHYADDR ==

Re: [PATCH] x86/cpu/AMD: Adjust x86_phys_bits to account for reduced PA in SEV-* guests

2021-03-17 Thread Sean Christopherson
> > VMM is buggy or malicious, overriding MAXPHYADDR to %d.\n" > > Not sure about that. This will make a lot of users run scared, not > knowing what's going on and open bugzillas. Yeah, I'm not too sure about it either. I would not object to dropping it to a pr_info

Re: [PATCH] x86/cpu/AMD: Adjust x86_phys_bits to account for reduced PA in SEV-* guests

2021-03-17 Thread Borislav Petkov
not knowing what's going on and open bugzillas. > + > static void early_detect_mem_encrypt(struct cpuinfo_x86 *c) > { > u64 msr; > > + /* > + * When running as an SEV guest of any flavor, update the physical > + * address width to account for

[PATCH] x86/cpu/AMD: Adjust x86_phys_bits to account for reduced PA in SEV-* guests

2021-03-17 Thread Sean Christopherson
n running as an SEV guest of any flavor, update the physical +* address width to account for the C-bit and clear all of the SME/SVE +* feature flags. As far as the kernel is concerned, the SEV flags +* enumerate what features can be used by the kernel/KVM,

Re: [PATCH v4 03/25] mm/vmstat: Add functions to account folio statistics

2021-03-17 Thread Christoph Hellwig
> +static inline > +void __inc_zone_folio_stat(struct folio *folio, enum zone_stat_item item) This prototype style is weird and doesn't follow either of the preffered styles.. > static inline void __mod_zone_freepage_state(struct zone *zone, int nr_pages, >

[PATCH 5.11 238/306] net: phy: ti: take into account all possible interrupt sources

2021-03-15 Thread gregkh
From: Greg Kroah-Hartman From: Ioana Ciornei [ Upstream commit 73f476aa1975bae6a792b340f5b26ffcfba869a6 ] The previous implementation of .handle_interrupt() did not take into account the fact that all the interrupt status registers should be acknowledged since multiple interrupt sources could

Re: [PATCH v4 03/25] mm/vmstat: Add functions to account folio statistics

2021-03-13 Thread Andrew Morton
On Sun, 14 Mar 2021 04:11:55 + Matthew Wilcox wrote: > On Sat, Mar 13, 2021 at 12:37:07PM -0800, Andrew Morton wrote: > > On Fri, 5 Mar 2021 04:18:39 + "Matthew Wilcox (Oracle)" > > wrote: > > > > > Allow page counters to be more readily modified by callers which have > > > a folio.

Re: [PATCH v4 03/25] mm/vmstat: Add functions to account folio statistics

2021-03-13 Thread Matthew Wilcox
On Sat, Mar 13, 2021 at 12:37:07PM -0800, Andrew Morton wrote: > On Fri, 5 Mar 2021 04:18:39 + "Matthew Wilcox (Oracle)" > wrote: > > > Allow page counters to be more readily modified by callers which have > > a folio. Name these wrappers with 'stat' instead of 'state' as requested > > by

Re: [PATCH v4 03/25] mm/vmstat: Add functions to account folio statistics

2021-03-13 Thread Andrew Morton
On Fri, 5 Mar 2021 04:18:39 + "Matthew Wilcox (Oracle)" wrote: > Allow page counters to be more readily modified by callers which have > a folio. Name these wrappers with 'stat' instead of 'state' as requested > by Linus here: >

[PATCH 4.4 28/30] zsmalloc: account the number of compacted pages correctly

2021-03-05 Thread Greg Kroah-Hartman
urn the correct number of pages freed(issued by current shrinker). The fix is simple: 1. account the number of pages freed in zs_compact locally. 2. use actomic variable pages_compacted to accumulate total number. Link: https://lkml.kernel.org/r/20210202122235.26885-1-wu-...@tcl.com Fi

[PATCH 4.9 39/41] zsmalloc: account the number of compacted pages correctly

2021-03-05 Thread Greg Kroah-Hartman
urn the correct number of pages freed(issued by current shrinker). The fix is simple: 1. account the number of pages freed in zs_compact locally. 2. use actomic variable pages_compacted to accumulate total number. Link: https://lkml.kernel.org/r/20210202122235.26885-1-wu-...@tcl.com Fi

[PATCH 4.14 37/39] zsmalloc: account the number of compacted pages correctly

2021-03-05 Thread Greg Kroah-Hartman
urn the correct number of pages freed(issued by current shrinker). The fix is simple: 1. account the number of pages freed in zs_compact locally. 2. use actomic variable pages_compacted to accumulate total number. Link: https://lkml.kernel.org/r/20210202122235.26885-1-wu-...@tcl.com Fi

[PATCH 4.19 48/52] zsmalloc: account the number of compacted pages correctly

2021-03-05 Thread Greg Kroah-Hartman
urn the correct number of pages freed(issued by current shrinker). The fix is simple: 1. account the number of pages freed in zs_compact locally. 2. use actomic variable pages_compacted to accumulate total number. Link: https://lkml.kernel.org/r/20210202122235.26885-1-wu-...@tcl.com Fi

[PATCH 5.4 67/72] zsmalloc: account the number of compacted pages correctly

2021-03-05 Thread Greg Kroah-Hartman
urn the correct number of pages freed(issued by current shrinker). The fix is simple: 1. account the number of pages freed in zs_compact locally. 2. use actomic variable pages_compacted to accumulate total number. Link: https://lkml.kernel.org/r/20210202122235.26885-1-wu-...@tcl.com Fi

[PATCH 5.10 089/102] zsmalloc: account the number of compacted pages correctly

2021-03-05 Thread Greg Kroah-Hartman
urn the correct number of pages freed(issued by current shrinker). The fix is simple: 1. account the number of pages freed in zs_compact locally. 2. use actomic variable pages_compacted to accumulate total number. Link: https://lkml.kernel.org/r/20210202122235.26885-1-wu-...@tcl.com Fi

[PATCH v4 03/25] mm/vmstat: Add functions to account folio statistics

2021-03-04 Thread Matthew Wilcox (Oracle)
Allow page counters to be more readily modified by callers which have a folio. Name these wrappers with 'stat' instead of 'state' as requested by Linus here: https://lore.kernel.org/linux-mm/CAHk-=wj847sudr-kt+46ft3+xffgiwpgthvm7djwgdi4cvr...@mail.gmail.com/ Signed-off-by: Matthew Wilcox

Re: [PATCH v3] mm: memcontrol: fix kernel stack account

2021-03-03 Thread Roman Gushchin
On Wed, Mar 03, 2021 at 11:18:43PM +0800, Muchun Song wrote: > For simplification 991e7673859e ("mm: memcontrol: account kernel stack > per node") has changed the per zone vmalloc backed stack pages > accounting to per node. By doing that we have lost a certain precision &g

[PATCH v3] mm: memcontrol: fix kernel stack account

2021-03-03 Thread Muchun Song
For simplification 991e7673859e ("mm: memcontrol: account kernel stack per node") has changed the per zone vmalloc backed stack pages accounting to per node. By doing that we have lost a certain precision because those pages might live in different NUMA nodes. In the end NR_KERNE

Re: [PATCH v2] mm: memcontrol: fix kernel stack account

2021-03-03 Thread Johannes Weiner
On Wed, Mar 03, 2021 at 05:39:56PM +0800, Muchun Song wrote: > For simplification 991e7673859e ("mm: memcontrol: account kernel stack > per node") has changed the per zone vmalloc backed stack pages > accounting to per node. By doing that we have lost a certain precision &g

Re: [External] Re: [PATCH v2] mm: memcontrol: fix kernel stack account

2021-03-03 Thread Shakeel Butt
On Wed, Mar 3, 2021 at 6:02 AM Michal Hocko wrote: > [...] > > > > + BUG_ON(vm->nr_pages != THREAD_SIZE / PAGE_SIZE); > > > > > > I do not think we need this BUG_ON. What kind of purpose does it serve? > > > > vm->nr_pages should be always equal to THREAD_SIZE / PAGE_SIZE > > if the

Re: [External] Re: [PATCH v2] mm: memcontrol: fix kernel stack account

2021-03-03 Thread Michal Hocko
On Wed 03-03-21 21:27:24, Muchun Song wrote: > On Wed, Mar 3, 2021 at 6:25 PM Michal Hocko wrote: > > > > On Wed 03-03-21 17:39:56, Muchun Song wrote: > > > For simplification 991e7673859e ("mm: memcontrol: account kernel stack > > > per node") has chan

Re: [External] Re: [PATCH v2] mm: memcontrol: fix kernel stack account

2021-03-03 Thread Muchun Song
On Wed, Mar 3, 2021 at 6:25 PM Michal Hocko wrote: > > On Wed 03-03-21 17:39:56, Muchun Song wrote: > > For simplification 991e7673859e ("mm: memcontrol: account kernel stack > > per node") has changed the per zone vmalloc backed stack pages > > accounting to pe

Re: [PATCH v2] mm: memcontrol: fix kernel stack account

2021-03-03 Thread Michal Hocko
On Wed 03-03-21 17:39:56, Muchun Song wrote: > For simplification 991e7673859e ("mm: memcontrol: account kernel stack > per node") has changed the per zone vmalloc backed stack pages > accounting to per node. By doing that we have lost a certain precision > because

[PATCH v2] mm: memcontrol: fix kernel stack account

2021-03-03 Thread Muchun Song
For simplification 991e7673859e ("mm: memcontrol: account kernel stack per node") has changed the per zone vmalloc backed stack pages accounting to per node. By doing that we have lost a certain precision because those pages might live in different NUMA nodes. In the end NR_KERNE

Re: [PATCH] mm: memcontrol: fix kernel stack account

2021-03-02 Thread Roman Gushchin
On Tue, Mar 02, 2021 at 08:33:20PM +0100, Michal Hocko wrote: > On Tue 02-03-21 10:50:32, Roman Gushchin wrote: > > On Tue, Mar 02, 2021 at 03:37:33PM +0800, Muchun Song wrote: > > > The alloc_thread_stack_node() cannot guarantee that allocated stack pages > > > are in the same node when

Re: [PATCH] mm: memcontrol: fix kernel stack account

2021-03-02 Thread Michal Hocko
On Tue 02-03-21 10:50:32, Roman Gushchin wrote: > On Tue, Mar 02, 2021 at 03:37:33PM +0800, Muchun Song wrote: > > The alloc_thread_stack_node() cannot guarantee that allocated stack pages > > are in the same node when CONFIG_VMAP_STACK. Because we do not specify > > __GFP_THISNODE to

Re: [PATCH] mm: memcontrol: fix kernel stack account

2021-03-02 Thread Roman Gushchin
c_page_state() for each page one by one. Hm, I actually wonder if it makes any sense to split the stack over multiple nodes? Maybe we should fix this instead? > > Fixes: 991e7673859e ("mm: memcontrol: account kernel stack per node") > Signed-off-by: Muchun Song > --- > ke

Re: [PATCH] mm: memcontrol: fix kernel stack account

2021-03-02 Thread Michal Hocko
fy > > __GFP_THISNODE to __vmalloc_node_range(). > > Instead of __GFP_THISNODE, mention that the kernel_clone() passes > NUMA_NO_NODE which is being used for __vmalloc_node_range(). If we really want to do this then I would recommend reasoning in the following line: " For simplification 991e767385

Re: [PATCH] mm: memcontrol: fix kernel stack account

2021-03-02 Thread Shakeel Butt
ODE, mention that the kernel_clone() passes NUMA_NO_NODE which is being used for __vmalloc_node_range(). > Fix it by caling calling > mod_lruvec_page_state() for each page one by one. > > Fixes: 991e7673859e ("mm: memcontrol: account kernel stack per node") > Signed-off-by: Muchun Son

Re: [External] Re: [PATCH] mm: memcontrol: fix kernel stack account

2021-03-02 Thread Shakeel Butt
On Tue, Mar 2, 2021 at 1:34 AM Michal Hocko wrote: > [snip] > > Yeah, imprecision may > > not be a problem. But if this is what we did deliberately, I think that > > it is better to add a comment there. Thanks. > > Yes the comment is quite confusing. I suspect it meant to say > /* All

Re: [External] Re: [PATCH] mm: memcontrol: fix kernel stack account

2021-03-02 Thread Muchun Song
On Tue, Mar 2, 2021 at 5:34 PM Michal Hocko wrote: > > On Tue 02-03-21 17:23:42, Muchun Song wrote: > > On Tue, Mar 2, 2021 at 4:44 PM Michal Hocko wrote: > > > > > > On Tue 02-03-21 15:37:33, Muchun Song wrote: > > > > The alloc_thread_stack_node() cannot guarantee that allocated stack > > > >

Re: [External] Re: [PATCH] mm: memcontrol: fix kernel stack account

2021-03-02 Thread Michal Hocko
On Tue 02-03-21 17:23:42, Muchun Song wrote: > On Tue, Mar 2, 2021 at 4:44 PM Michal Hocko wrote: > > > > On Tue 02-03-21 15:37:33, Muchun Song wrote: > > > The alloc_thread_stack_node() cannot guarantee that allocated stack pages > > > are in the same node when CONFIG_VMAP_STACK. Because we do

Re: [External] Re: [PATCH] mm: memcontrol: fix kernel stack account

2021-03-02 Thread Muchun Song
cision may not be a problem. But if this is what we did deliberately, I think that it is better to add a comment there. Thanks. > > > Fixes: 991e7673859e ("mm: memcontrol: account kernel stack per node") > > Signed-off-by: Muchun Song > > --- > > kernel/fork.c |

Re: [PATCH] mm: memcontrol: fix kernel stack account

2021-03-02 Thread Michal Hocko
1e7673859e ("mm: memcontrol: account kernel stack per node") > Signed-off-by: Muchun Song > --- > kernel/fork.c | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/kernel/fork.c b/kernel/fork.c > index d66cd1014211..6e2201feb5

[PATCH] mm: memcontrol: fix kernel stack account

2021-03-02 Thread Muchun Song
ntrol: account kernel stack per node") Signed-off-by: Muchun Song --- kernel/fork.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/kernel/fork.c b/kernel/fork.c index d66cd1014211..6e2201feb524 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -379,14 +379,19

[PATCH 5.11 641/775] btrfs: account for new extents being deleted in total_bytes_pinned

2021-03-01 Thread Greg Kroah-Hartman
ransaction. We use the space_info->total_bytes_pinned to approximate how much space we have pinned. It's approximate because if we remove a reference to an extent we may free it, but there may be more references to it than we know of at that point, but we account it as pinned at the

[PATCH 5.11 535/775] ice: Account for port VLAN in VF max packet size calculation

2021-03-01 Thread Greg Kroah-Hartman
From: Brett Creeley [ Upstream commit a6aa7c8f998f4afddd73410aa043dad38162ce9e ] Currently if an AVF driver doesn't account for the possibility of a port VLAN when determining its max packet size then packets at MTU will be dropped. It is not the VF driver's responsibility to account for a port

[PATCH 5.10 538/663] btrfs: account for new extents being deleted in total_bytes_pinned

2021-03-01 Thread Greg Kroah-Hartman
ransaction. We use the space_info->total_bytes_pinned to approximate how much space we have pinned. It's approximate because if we remove a reference to an extent we may free it, but there may be more references to it than we know of at that point, but we account it as pinned at the

[PATCH 5.10 143/663] drm/vc4: hdmi: Take into account the clock doubling flag in atomic_check

2021-03-01 Thread Greg Kroah-Hartman
. However, unlike what mode_valid was checking for, we forgot to take into account the clock doubling flag that can be set for modes. Let's honor that flag if it's there. Acked-by: Thomas Zimmermann Reported-by: Thomas Zimmermann Reviewed-by: Dave Stevenson Fixes: 63495f6b4aed ("drm/vc4: hdmi

[PATCH 5.10 446/663] ice: Account for port VLAN in VF max packet size calculation

2021-03-01 Thread Greg Kroah-Hartman
From: Brett Creeley [ Upstream commit a6aa7c8f998f4afddd73410aa043dad38162ce9e ] Currently if an AVF driver doesn't account for the possibility of a port VLAN when determining its max packet size then packets at MTU will be dropped. It is not the VF driver's responsibility to account for a port

[PATCH 5.11 175/775] drm/vc4: hdmi: Take into account the clock doubling flag in atomic_check

2021-03-01 Thread Greg Kroah-Hartman
. However, unlike what mode_valid was checking for, we forgot to take into account the clock doubling flag that can be set for modes. Let's honor that flag if it's there. Acked-by: Thomas Zimmermann Reported-by: Thomas Zimmermann Reviewed-by: Dave Stevenson Fixes: 63495f6b4aed ("drm/vc4: hdmi

[PATCH 5.11 015/775] zsmalloc: account the number of compacted pages correctly

2021-03-01 Thread Greg Kroah-Hartman
urn the correct number of pages freed(issued by current shrinker). The fix is simple: 1. account the number of pages freed in zs_compact locally. 2. use actomic variable pages_compacted to accumulate total number. Link: https://lkml.kernel.org/r/20210202122235.26885-1-wu-...@tcl.com Fi

Re: [PATCH 5/6] clk: qcom: gcc-sdm660: Account for needed adjustments in probe function

2021-02-25 Thread Konrad Dybcio
Hi and sorry for the late reply, >> + >> + /* Keep bimc gfx clock port on all the time */ >> + clk_prepare_enable(gcc_bimc_gfx_clk.clkr.hw.clk); >> + > Preferably just set these various bits with regmap_update_bits() during > probe. Also, please do it before regsitering the clks, not

Re: [PATCH 5/6] clk: qcom: gcc-sdm660: Account for needed adjustments in probe function

2021-02-22 Thread Stephen Boyd
Quoting Konrad Dybcio (2021-02-20 07:56:16) > Downstream kernel executes a bunch of commands, such as keeping > GPU/MMSS interface clocks alive to make sure all subsystems can > work properly. Add these to make sure they do. > > Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC)

[PATCH 5/6] clk: qcom: gcc-sdm660: Account for needed adjustments in probe function

2021-02-20 Thread Konrad Dybcio
Downstream kernel executes a bunch of commands, such as keeping GPU/MMSS interface clocks alive to make sure all subsystems can work properly. Add these to make sure they do. Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC) driver for SDM660") Signed-off-by: Konrad Dybcio ---

[PATCH 5.10 07/54] io_uring: account io_uring internal files as REQ_F_INFLIGHT

2021-02-11 Thread Greg Kroah-Hartman
From: Jens Axboe [ Upstream commit 02a13674fa0e8dd326de8b9f4514b41b03d99003 ] We need to actively cancel anything that introduces a potential circular loop, where io_uring holds a reference to itself. If the file in question is an io_uring file, then add the request to the inflight list. Cc:

[PATCH v11 02/17] PCI: endpoint: Make *_get_first_free_bar() take into account 64 bit BAR

2021-02-01 Thread Kishon Vijay Abraham I
pci_epc_get_first_free_bar() uses only "reserved_bar" member in epc_features to get the first unreserved BAR. However if the reserved BAR is also a 64-bit BAR, then the next BAR shouldn't be returned (since 64-bit BAR uses two BARs). Make pci_epc_get_first_free_bar() take into account

[PATCH v3 2/2] perf stat: Take cgroups into account for shadow stats

2021-01-14 Thread Namhyung Kim
As of now it doesn't consider cgroups when collecting shadow stats and metrics so counter values from different cgroups will be saved in a same slot. This resulted in an incorrect numbers when those cgroups have different workloads. For example, let's look at the below - the cgroup A and C runs

[PATCH v2 2/2] perf stat: Take cgroups into account for shadow stats

2021-01-11 Thread Namhyung Kim
As of now it doesn't consider cgroups when collecting shadow stats and metrics so counter values from different cgroups will be saved in a same slot. This resulted in an incorrect numbers when those cgroups have different workloads. For example, let's look at the below - the cgroup A and C runs

[PATCH 5.10 009/145] ionic: account for vlan tag len in rx buffer len

2021-01-11 Thread Greg Kroah-Hartman
From: Shannon Nelson [ Upstream commit 83469893204281ecf65d572bddf02de29a19787c ] Let the FW know we have enough receive buffer space for the vlan tag if it isn't stripped. Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling") Signed-off-by: Shannon Nelson Link:

[PATCH 5.4 44/92] ionic: account for vlan tag len in rx buffer len

2021-01-11 Thread Greg Kroah-Hartman
From: Shannon Nelson [ Upstream commit 83469893204281ecf65d572bddf02de29a19787c ] Let the FW know we have enough receive buffer space for the vlan tag if it isn't stripped. Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling") Signed-off-by: Shannon Nelson Link:

[PATCH v9 02/17] PCI: endpoint: Make *_get_first_free_bar() take into account 64 bit BAR

2021-01-04 Thread Kishon Vijay Abraham I
pci_epc_get_first_free_bar() uses only "reserved_bar" member in epc_features to get the first unreserved BAR. However if the reserved BAR is also a 64-bit BAR, then the next BAR shouldn't be returned (since 64-bit BAR uses two BARs). Make pci_epc_get_first_free_bar() take into account

[PATCH v6 2/7] mm: memcontrol: convert NR_ANON_THPS account to pages

2020-12-28 Thread Muchun Song
make the statistics more accuracy for the THP vmstat counters. So we convert the NR_ANON_THPS account to pages. This patch is consistent with 8f182270dfec ("mm/swap.c: flush lru pvecs on compound page arrival"). Doing this also can make the unit of vmstat counters more unified. Finally

[PATCH v6 6/7] mm: memcontrol: convert NR_FILE_PMDMAPPED account to pages

2020-12-28 Thread Muchun Song
make the statistics more accuracy for the THP vmstat counters. So we convert the NR_FILE_PMDMAPPED account to pages. This patch is consistent with 8f182270dfec ("mm/swap.c: flush lru pvecs on compound page arrival"). Doing this also can make the unit of vmstat counters more unified. Finally

[PATCH v6 3/7] mm: memcontrol: convert NR_FILE_THPS account to pages

2020-12-28 Thread Muchun Song
make the statistics more accuracy for the THP vmstat counters. So we convert the NR_FILE_THPS account to pages. This patch is consistent with 8f182270dfec ("mm/swap.c: flush lru pvecs on compound page arrival"). Doing this also can make the unit of vmstat counters more unified. Finally

  1   2   3   4   5   6   7   8   9   10   >