Re: [PATCH v2 07/12] s390: add pte_free_defer() for pgtables sharing page

2023-07-04 Thread Alexander Gordeev
On Sat, Jul 01, 2023 at 09:32:38PM -0700, Hugh Dickins wrote: > On Thu, 29 Jun 2023, Hugh Dickins wrote: Hi Hugh, ... > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > +void pte_free_defer(struct mm_struct *mm, pgtable_t pgtable) > +{ > + struct page *page; If I got your and Claudio conversation righ

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-04 Thread Suren Baghdasaryan
On Tue, Jul 4, 2023 at 3:04 PM Suren Baghdasaryan wrote: > > On Tue, Jul 4, 2023 at 2:28 PM Andrew Morton > wrote: > > > > On Tue, 4 Jul 2023 13:22:54 -0700 Suren Baghdasaryan > > wrote: > > > > > On Tue, Jul 4, 2023 at 9:18 AM Andrew Morton > > > wrote: > > > > > > > > On Tue, 4 Jul 2023 09

Re: [PATCH v7 2/8] KVM: Introduce __kvm_follow_pfn function

2023-07-04 Thread Yu Zhang
> @@ -2514,35 +2512,26 @@ static bool hva_to_pfn_fast(unsigned long addr, bool > write_fault, > * The slow path to get the pfn of the specified host virtual address, > * 1 indicates success, -errno is returned if error is detected. > */ > -static int hva_to_pfn_slow(unsigned long addr, bool

Re: [PATCH v3 6/9] cpu/SMT: Allow enabling partial SMT states via sysfs

2023-07-04 Thread Zhang, Rui
On Thu, 2023-06-29 at 16:31 +0200, Laurent Dufour wrote: > @@ -2580,6 +2597,17 @@ static ssize_t control_show(struct device > *dev, >  { > const char *state = smt_states[cpu_smt_control]; >   > +#ifdef CONFIG_HOTPLUG_SMT > +   /* > +    * If SMT is enabled but not all threads are en

Re: [PATCH v3 3/9] cpu/SMT: Store the current/max number of threads

2023-07-04 Thread Zhang, Rui
On Thu, 2023-06-29 at 16:31 +0200, Laurent Dufour wrote: > From: Michael Ellerman > > Some architectures allows partial SMT states at boot time, s/allows/allow. thanks, rui

Re: [PATCH v3 0/9] Introduce SMT level and add PowerPC support

2023-07-04 Thread Zhang, Rui
Hi, Laurent, I want to test this patch set and found that it does not apply on top of latest usptream git, because of some changes in this merge window, so better rebase. thanks, rui On Thu, 2023-06-29 at 16:31 +0200, Laurent Dufour wrote: > I'm taking over the series Michael sent previously [1]

[PATCH] powerpc/config: Disable SLAB_DEBUG_ON in skiroot

2023-07-04 Thread Joel Stanley
In 5.10 commit 5e84dd547bce ("powerpc/configs/skiroot: Enable some more hardening options") set SLUB_DEUBG_ON. When 5.14 came around, commit 792702911f58 ("slub: force on no_hash_pointers when slub_debug is enabled") print all the pointers when SLUB_DEUBG_ON is set. This was fine, but in 5.12 comm

Re: [11/12] fbdev/core: Protect edid_info with CONFIG_ARCH_HAS_EDID_INFO

2023-07-04 Thread Sui Jingfeng
Hi, On 2023/6/29 19:45, Thomas Zimmermann wrote: Guard usage of edid_info with CONFIG_ARCH_HAS_EDID_INFO instead of CONFIG_X86. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sui Jingfeng Cc: Daniel Vetter Cc: Helge Deller Cc: Randy Dunlap --- drivers/video/f

Re: [03/12] sysfb: Do not include from sysfb header

2023-07-04 Thread Sui Jingfeng
On 2023/6/29 19:45, Thomas Zimmermann wrote: The header file does not need anything from . Declare struct screen_info and remove the include statements. Signed-off-by: Thomas Zimmermann Cc: Ard Biesheuvel Cc: Hans de Goede Cc: Javier Martinez Canillas Reviewed-by: Javier Martinez Canillas

Re: [01/12] efi: Do not include from EFI header

2023-07-04 Thread Sui Jingfeng
Hi, Thomas I love your patch, LoongArch also have UEFI GOP support, Maybe the arch/loongarch/kernel/efi.c don't include the '#include ' explicitly. ``` diff --git a/arch/loongarch/kernel/efi.c b/arch/loongarch/kernel/efi.c index 3d448fef3af4..04f4d217aefb 100644 --- a/arch/loongarch/kernel

Re: [08/12] drivers/firmware: Remove trailing whitespaces

2023-07-04 Thread Sui Jingfeng
Hi, On 2023/6/29 19:45, Thomas Zimmermann wrote: Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sui Jingfeng --- drivers/firmware/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/Kconfig b/drivers/fir

Re: [05/12] arch: Remove trailing whitespaces

2023-07-04 Thread Sui Jingfeng
On 2023/6/29 19:45, Thomas Zimmermann wrote: Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: Andrew Morton Cc: Geert Uytterhoeven Cc: Arnd Bergmann Cc: "Kirill A. Shutemov" Cc: Anshuman Khand

Re: [06/12] arch: Declare screen_info in

2023-07-04 Thread Sui Jingfeng
Hi, Thomas I love your patch, yet after applied your patch, the linux kernel fail to compile on my LoongArch machine. ```   CC  arch/loongarch/kernel/efi.o arch/loongarch/kernel/efi.c: In function ‘init_screen_info’: arch/loongarch/kernel/efi.c:77:54: error: invalid application of ‘siz

Re: [PATCH] powernv/opal-prd: Silence memcpy() run-time false positive warnings

2023-07-04 Thread Jordan Niethe
On 26/6/23 5:04 pm, Mahesh Salgaonkar wrote: opal_prd_msg_notifier extracts the opal prd message size from the message header and uses it for allocating opal_prd_msg_queue_item that includes the correct message size to be copied. However, while running under CONFIG_FORTIFY_SOURCE=y, it trigger

[PATCH] rtc: Kconfig: select REGMAP for RTC_DRV_DS1307

2023-07-04 Thread Benjamin Gray
The drivers/rtc/rtc-ds1307.c driver has a direct dependency on struct regmap_config, which is guarded behind CONFIG_REGMAP. Commit 70a640c0efa7 ("regmap: REGMAP_KUNIT should not select REGMAP") exposed this by disabling the default pick unless KUNIT_ALL_TESTS is set, causing the ppc64be allnoconfi

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-04 Thread Suren Baghdasaryan
On Tue, Jul 4, 2023 at 2:28 PM Andrew Morton wrote: > > On Tue, 4 Jul 2023 13:22:54 -0700 Suren Baghdasaryan > wrote: > > > On Tue, Jul 4, 2023 at 9:18 AM Andrew Morton > > wrote: > > > > > > On Tue, 4 Jul 2023 09:00:19 +0100 Greg KH > > > wrote: > > > > > > > > > > > Thanks! I'll investigat

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-04 Thread Andrew Morton
On Tue, 4 Jul 2023 13:22:54 -0700 Suren Baghdasaryan wrote: > On Tue, Jul 4, 2023 at 9:18 AM Andrew Morton > wrote: > > > > On Tue, 4 Jul 2023 09:00:19 +0100 Greg KH > > wrote: > > > > > > > > > Thanks! I'll investigate this later today. After discussing with > > > > > > > Andrew, we would li

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-04 Thread Suren Baghdasaryan
On Tue, Jul 4, 2023 at 9:18 AM Andrew Morton wrote: > > On Tue, 4 Jul 2023 09:00:19 +0100 Greg KH wrote: > > > > > > > Thanks! I'll investigate this later today. After discussing with > > > > > > Andrew, we would like to disable CONFIG_PER_VMA_LOCK by default > > > > > > until > > > > > > the is

Re: [PATCH v2 07/12] s390: add pte_free_defer() for pgtables sharing page

2023-07-04 Thread Hugh Dickins
On Tue, 4 Jul 2023, Gerald Schaefer wrote: > On Sat, 1 Jul 2023 21:32:38 -0700 (PDT) > Hugh Dickins wrote: > > On Thu, 29 Jun 2023, Hugh Dickins wrote: > > > > > > I've grown to dislike the (ab)use of pt_frag_refcount even more, to the > > > extent that I've not even tried to verify it; but I thi

Re: [PATCH 05/12] arch: Remove trailing whitespaces

2023-07-04 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > Fix coding style. No functional changes. > > Signed-off-by: Thomas Zimmermann > Cc: Yoshinori Sato > Cc: Rich Felker > Cc: John Paul Adrian Glaubitz > Cc: Andrew Morton > Cc: Geert Uytterhoeven > Cc: Arnd Bergmann > Cc: "Kirill A. Shutemov" > Cc: Anshuman Khand

Re: [PATCH 04/12] staging/sm750fb: Do not include

2023-07-04 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > The sm750fb driver does not need anything from . > Remove the include statements. > > Signed-off-by: Thomas Zimmermann > Cc: Sudip Mukherjee > Cc: Teddy Wang > --- Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Re

Re: [PATCH 03/12] sysfb: Do not include from sysfb header

2023-07-04 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > The header file does not need anything from > . Declare struct screen_info and remove > the include statements. > > Signed-off-by: Thomas Zimmermann > Cc: Ard Biesheuvel > Cc: Hans de Goede > Cc: Javier Martinez Canillas > --- Reviewed-by: Javier Martinez Canilla

Re: [PATCH 02/12] fbdev/sm712fb: Do not include

2023-07-04 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > Sm712fb's dependency on is artificial in that > it only uses struct screen_info for its internals. Replace the use of > struct screen_info with a custom data structure and remove the include > of . > > Signed-off-by: Thomas Zimmermann > Cc: Sudip Mukherjee > Cc: Ted

Re: [PATCH 01/12] efi: Do not include from EFI header

2023-07-04 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > The header file does not need anything from > . Declare struct screen_info and remove > the include statements. Update a number of source files that > require struct screen_info's definition. > > Signed-off-by: Thomas Zimmermann > Cc: Ard Biesheuvel > Cc: Russell Ki

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-04 Thread Andrew Morton
On Tue, 4 Jul 2023 09:00:19 +0100 Greg KH wrote: > > > > > Thanks! I'll investigate this later today. After discussing with > > > > > Andrew, we would like to disable CONFIG_PER_VMA_LOCK by default until > > > > > the issue is fixed. I'll post a patch shortly. > > > > > > > > Posted at: > > > >

Re: [PATCH v2 07/12] s390: add pte_free_defer() for pgtables sharing page

2023-07-04 Thread Hugh Dickins
On Tue, 4 Jul 2023, Alexander Gordeev wrote: > On Sat, Jul 01, 2023 at 09:32:38PM -0700, Hugh Dickins wrote: > > On Thu, 29 Jun 2023, Hugh Dickins wrote: > > Hi Hugh, > > ... > > No, not quite the same rules as before: I came to realize that using > > list_add_tail() for the HH pages would be lia

Re: [PATCH v2 07/12] s390: add pte_free_defer() for pgtables sharing page

2023-07-04 Thread Gerald Schaefer
On Sat, 1 Jul 2023 21:32:38 -0700 (PDT) Hugh Dickins wrote: > On Thu, 29 Jun 2023, Hugh Dickins wrote: > > > > I've grown to dislike the (ab)use of pt_frag_refcount even more, to the > > extent that I've not even tried to verify it; but I think I do get the > > point now, that we need further in

Re: [RESEND PATCH v9 2/2] arm64: support batched/deferred tlb shootdown during page reclamation/migration

2023-07-04 Thread Yicong Yang
On 2023/6/30 1:26, Catalin Marinas wrote: > On Thu, Jun 29, 2023 at 05:31:36PM +0100, Catalin Marinas wrote: >> On Thu, May 18, 2023 at 02:59:34PM +0800, Yicong Yang wrote: >>> From: Barry Song >>> >>> on x86, batched and deferred tlb shootdown has lead to 90% >>> performance increase on tlb shoot

Re: [PATCH v2 07/12] s390: add pte_free_defer() for pgtables sharing page

2023-07-04 Thread Alexander Gordeev
On Sat, Jul 01, 2023 at 09:32:38PM -0700, Hugh Dickins wrote: > On Thu, 29 Jun 2023, Hugh Dickins wrote: Hi Hugh, ... > No, not quite the same rules as before: I came to realize that using > list_add_tail() for the HH pages would be liable to put a page on the > list which forever blocked reuse o

Re: [RFC 1/1] sched/fair: Consider asymmetric scheduler groups in load balancer

2023-07-04 Thread Peter Zijlstra
On Mon, May 15, 2023 at 01:46:01PM +0200, Tobias Huschle wrote: > The current load balancer implementation implies that scheduler groups, > within the same domain, all host the same number of CPUs. This is > reflected in the condition, that a scheduler group, which is load > balancing and classifie

Re: [RFC 0/1] sched/fair: Consider asymmetric scheduler groups in load balancer

2023-07-04 Thread Tobias Huschle
On 2023-05-16 18:35, Dietmar Eggemann wrote: On 15/05/2023 13:46, Tobias Huschle wrote: The current load balancer implementation implies that scheduler groups, within the same scheduler domain, all host the same number of CPUs. This appears to be valid for non-s390 architectures. Nevertheless,

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-04 Thread Greg KH
On Tue, Jul 04, 2023 at 12:45:39AM -0700, Suren Baghdasaryan wrote: > On Mon, Jul 3, 2023 at 11:44 AM Greg KH wrote: > > > > On Mon, Jul 03, 2023 at 11:27:19AM -0700, Suren Baghdasaryan wrote: > > > On Mon, Jul 3, 2023 at 11:08 AM Suren Baghdasaryan > > > wrote: > > > > > > > > On Mon, Jul 3, 20

[PATCH v7 8/8] KVM: remove __gfn_to_pfn_memslot

2023-07-04 Thread David Stevens
From: David Stevens All callers have been migrated to __kvm_follow_pfn. Signed-off-by: David Stevens --- virt/kvm/kvm_main.c | 33 - 1 file changed, 33 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 0f7b41f220b6..5b5afd70f239 100644 -

[PATCH v7 7/8] KVM: PPC: Migrate to __kvm_follow_pfn

2023-07-04 Thread David Stevens
From: David Stevens Migrate from __gfn_to_pfn_memslot to __kvm_follow_pfn. As part of the refactoring, remove the redundant calls to get_user_page_fast_only, since the check for !async && !atomic was removed from the KVM generic code in b9b33da2aa74. Also, remove the kvm_ro parameter because the

[PATCH v7 6/8] KVM: arm64: Migrate to __kvm_follow_pfn

2023-07-04 Thread David Stevens
From: David Stevens Migrate from __gfn_to_pfn_memslot to __kvm_follow_pfn. Signed-off-by: David Stevens --- arch/arm64/kvm/mmu.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index 6db9ef288ec3..c7065

[PATCH v7 4/8] KVM: x86/mmu: Migrate to __kvm_follow_pfn

2023-07-04 Thread David Stevens
From: David Stevens Migrate from __gfn_to_pfn_memslot to __kvm_follow_pfn. Signed-off-by: David Stevens --- arch/x86/kvm/mmu/mmu.c | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index ec1

[PATCH v7 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-07-04 Thread David Stevens
From: David Stevens Stop passing FOLL_GET to __kvm_follow_pfn. This allows the host to map memory into the guest that is backed by un-refcounted struct pages - for example, higher order non-compound pages allocated by the amdgpu driver via ttm_pool_alloc_page. The bulk of this change is tracking

[PATCH v7 3/8] KVM: Make __kvm_follow_pfn not imply FOLL_GET

2023-07-04 Thread David Stevens
From: David Stevens Make it so that __kvm_follow_pfn does not imply FOLL_GET. This allows callers to resolve a gfn when the associated pfn has a valid struct page that isn't being actively refcounted (e.g. tail pages of non-compound higher order pages). For a caller to safely omit FOLL_GET, all u

[PATCH v7 2/8] KVM: Introduce __kvm_follow_pfn function

2023-07-04 Thread David Stevens
From: David Stevens Introduce __kvm_follow_pfn, which will replace __gfn_to_pfn_memslot. __kvm_follow_pfn refactors the old API's arguments into a struct and, where possible, combines the boolean arguments into a single flags argument. Signed-off-by: David Stevens --- include/linux/kvm_host.h

[PATCH v7 1/8] KVM: Assert that a page's refcount is elevated when marking accessed/dirty

2023-07-04 Thread David Stevens
From: Sean Christopherson Assert that a page's refcount is elevated, i.e. that _something_ holds a reference to the page, when KVM marks a page as accessed and/or dirty. KVM typically doesn't hold a reference to pages that are mapped into the guest, e.g. to allow page migration, compaction, swap,

[PATCH v7 0/8] KVM: allow mapping non-refcounted pages

2023-07-04 Thread David Stevens
From: David Stevens This patch series adds support for mapping VM_IO and VM_PFNMAP memory that is backed by struct pages that aren't currently being refcounted (e.g. tail pages of non-compound higher order allocations) into the guest. Our use case is virtio-gpu blob resources [1], which directly

Re: Fwd: Memory corruption in multithreaded user space program while calling fork

2023-07-04 Thread Suren Baghdasaryan
On Mon, Jul 3, 2023 at 11:44 AM Greg KH wrote: > > On Mon, Jul 03, 2023 at 11:27:19AM -0700, Suren Baghdasaryan wrote: > > On Mon, Jul 3, 2023 at 11:08 AM Suren Baghdasaryan > > wrote: > > > > > > On Mon, Jul 3, 2023 at 2:53 AM Linux regression tracking (Thorsten > > > Leemhuis) wrote: > > > >