Re: [PATCH mm-unstable v2 16/16] mm: Respect mmap hint before THP alignment if allocation is possible

2024-12-12 Thread Yang Shi
to THP alignment if there isn't sufficient VA space > to satisfy the allocation at the hint address. > > Signed-off-by: Kalesh Singh Reviewed-by: Yang Shi > --- > mm/huge_memory.c | 17 ++--- > mm/mmap.c| 1 - > 2 files changed, 10 insertions(+), 8 d

Re: [PATCH mm-unstable v2 01/16] mm: Introduce generic_mmap_hint()

2024-12-12 Thread Yang Shi
MAP_FIXED case is also handled in arch_mmap_hint() since this is just a > special case of the hint addr being "enforced", per Yang Shi. > - Consolidate error handling in arch_mmap_hint(). Reviewed-by: Yang Shi > > include/lin

Re: [PATCH mm-unstable 17/17] mm: Respect mmap hint before THP alignment if allocation is possible

2024-12-10 Thread Yang Shi
On Tue, Dec 10, 2024 at 9:34 AM Kalesh Singh wrote: > > On Mon, Dec 9, 2024 at 7:37 PM Yang Shi wrote: > > > > On Mon, Dec 9, 2024 at 6:45 PM Kalesh Singh wrote: > > > > > > Commit 249608ee4713 ("mm: respect mmap hint address when aligning for > >

Re: [PATCH mm-unstable 17/17] mm: Respect mmap hint before THP alignment if allocation is possible

2024-12-09 Thread Yang Shi
On Mon, Dec 9, 2024 at 6:45 PM Kalesh Singh wrote: > > Commit 249608ee4713 ("mm: respect mmap hint address when aligning for THP") > fallsback to PAGE_SIZE alignment instead of THP alignment > for anonymous mapping as long as a hint address is provided by the user > -- even if we weren't able to a

Re: [PATCH mm-unstable 01/17] mm: Introduce generic_mmap_hint()

2024-12-09 Thread Yang Shi
On Mon, Dec 9, 2024 at 6:41 PM Kalesh Singh wrote: > > Consolidate the hint searches from both direcitons (topdown and > bottomup) into generic_mmap_hint(). > > No functional change is introduced. > > Signed-off-by: Kalesh Singh > --- > include/linux/sched/mm.h | 4 > mm/mmap.c

Re: [PATCH v2 2/2] mm/mmu_gather: send tlb_remove_table_smp_sync IPI only to MM CPUs

2023-06-22 Thread Yang Shi
On Wed, Jun 21, 2023 at 11:02 AM Nadav Amit wrote: > > > > > On Jun 20, 2023, at 7:46 AM, Yair Podemsky wrote: > > > > @@ -1525,7 +1525,7 @@ static void collapse_and_free_pmd(struct mm_struct > > *mm, struct vm_area_struct *v > > addr + HPAGE_PMD_SIZE); > > mm

Re: [v2 PATCH 1/2] mm: gup: fix the fast GUP race against THP collapse

2022-09-07 Thread Yang Shi
On Wed, Sep 7, 2022 at 2:22 PM Andrew Morton wrote: > > On Wed, 7 Sep 2022 11:01:43 -0700 Yang Shi wrote: > > > Since general RCU GUP fast was introduced in commit 2667f50e8b81 ("mm: > > introduce a general RCU get_user_pages_fast()"), a TLB flush is no

[v2 PATCH 1/2] mm: gup: fix the fast GUP race against THP collapse

2022-09-07 Thread Yang Shi
izing against fast GUP in khugepaged. Fixes: 2667f50e8b81 ("mm: introduce a general RCU get_user_pages_fast()") Acked-by: David Hildenbrand Acked-by: Peter Xu Signed-off-by: Yang Shi --- v2: * Incorporated the comment from Peter about the comment. * Moved the comment right befor

[v2 PATCH 2/2] powerpc/64s/radix: don't need to broadcast IPI for radix pmd collapse flush

2022-09-07 Thread Yang Shi
THP collapse by checking whether PMD is changed or not. So IPI broadcast in radix pmd collapse flush is not necessary anymore. But it is still needed for hash TLB. Suggested-by: Aneesh Kumar K.V Signed-off-by: Yang Shi --- arch/powerpc/mm/book3s64/radix_pgtable.c | 9 - 1 file changed

Re: [PATCH] mm: gup: fix the fast GUP race against THP collapse

2022-09-07 Thread Yang Shi
On Tue, Sep 6, 2022 at 9:51 PM Aneesh Kumar K V wrote: > > On 9/7/22 12:37 AM, Yang Shi wrote: > > On Mon, Sep 5, 2022 at 1:56 AM Aneesh Kumar K.V > > wrote: > >> > >> Yang Shi writes: > >> > >>> > >>> On Fri, Sep 2, 2022 at

Re: [RFC PATCH v2 3/7] mm: migrate: allocate the right size of non hugetlb or THP compound pages.

2021-12-12 Thread Yang Shi
On Fri, Dec 10, 2021 at 8:08 AM Zi Yan wrote: > > On 10 Dec 2021, at 2:53, Eric Ren wrote: > > > Hi, > > > > On 2021/12/10 07:04, Zi Yan wrote: > >> From: Zi Yan > >> > >> alloc_migration_target() is used by alloc_contig_range() and non-LRU > >> movable compound pages can be migrated. Current cod

Re: [PATCH] [v2] x86/mpx: fix recursive munmap() corruption

2019-04-22 Thread Yang Shi
er to hit, I belive the fundamental issue has been with us as long as MPX itself, thus the Fixes: tag below is for one of the original MPX commits. Reported-by: Richard Biener Reported-by: H.J. Lu Fixes: dd2283f2605e ("mm: mmap: zap pages with read mmap_sem in munmap") Cc: Yang Shi Cc: Mi

[PATCH] powerpc/4xx: make sam440ep_setup_rtc init

2016-04-26 Thread Yang Shi
sam440ep_setup_rtc is just called by machine_device_initcall, and it calls i2c_register_board_info which is init too, so the lack of __init may cause mismatch warning when linking kernel. Signed-off-by: Yang Shi --- arch/powerpc/platforms/44x/sam440ep.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] ppc64: select HAVE_CONTEXT_TRACKING by default

2015-12-09 Thread Yang Shi
PPC64 machines. Signed-off-by: Yang Shi --- Following the instruction in Documentation/timers/NO_HZ.txt, I tested full nohz on my FSL T2080 target, the below trace log shows it works well. user_loop-574 [001] d..1 137.044892: tick_stop: success=yes msg= user_loop-574 [001

[PATCH 1/2] KVM/PPC: Fix PPC KVM e500_tlb.c build error

2009-07-01 Thread Yang Shi
Since include/asm/mmu-fsl-booke.h was replaced by include/asm/mmu-book3e.h, fix e500_tlb.h to reflect the change and fix e500_tlb.c to align with the new page size macro definition in include/asm/mmu-book3e.h. Signed-off-by: Yang Shi --- arch/powerpc/kvm/e500_tlb.c |8 arch/powerpc

[PATCH 2/2] KVM/PPC: Fix kvm_main.c build error for PPC KVM

2009-07-01 Thread Yang Shi
With the latest kernel building KVM for PPC, got integer overflow error in kvm_main.c file. The root cause is that compiler consider KVM_PAGES_PER_HPAGE as signed long type, however it should be unsigned long type. So, change it to unsigned long type in include/asm/kvm_host.h Signed-off-by: Yang

[PATCH] powerpc/mpc85xx: Create dts for each core in CAMP mode for P2020DS

2009-06-24 Thread Yang Shi
, eth0, eth1, crypto, pci0, pci1, usb, spi, sdhci. core1: L2, dma2, eth2, pci2, msi. Based on MPC8572DS CAMP dts files. (commit 361425fc32422c9716fc69e52455b7d44fc02c18) Signed-off-by: Yang Shi --- arch/powerpc/boot/dts/p2020ds_camp_core0.dts | 457 ++ arch/powerpc

[PATCH] Add EDAC support for P2020DS

2009-06-24 Thread Yang Shi
rd so that EDAC core can recognize DDR3 memory type. Signed-off-by: Yang Shi --- (85xx DDR3 EDAC patch is currently in akpm's mm tree) drivers/edac/mpc85xx_edac.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_ed