[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202501061736.FoHcInHJ-lkp@intel.com>
Date: Mon, 6 Jan 2025 18:07:29 +0800
From: kernel test robot <lkp@...el.com>
To: Barry Song <21cnbao@...il.com>, akpm@...ux-foundation.org,
linux-mm@...ck.org
Cc: oe-kbuild-all@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
x86@...nel.org, linux-kernel@...r.kernel.org, ioworker0@...il.com,
david@...hat.com, ryan.roberts@....com, zhengtangquan@...o.com,
ying.huang@...el.com, kasong@...cent.com, chrisl@...nel.org,
baolin.wang@...ux.alibaba.com, Barry Song <v-songbaohua@...o.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Anshuman Khandual <anshuman.khandual@....com>,
Shaoqin Huang <shahuang@...hat.com>, Gavin Shan <gshan@...hat.com>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
Mark Rutland <mark.rutland@....com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Yosry Ahmed <yosryahmed@...gle.com>
Subject: Re: [PATCH 2/3] mm: Support tlbbatch flush for a range of PTEs
Hi Barry,
kernel test robot noticed the following build errors:
[auto build test ERROR on akpm-mm/mm-everything]
url: https://github.com/intel-lab-lkp/linux/commits/Barry-Song/mm-set-folio-swapbacked-iff-folios-are-dirty-in-try_to_unmap_one/20250106-112638
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20250106031711.82855-3-21cnbao%40gmail.com
patch subject: [PATCH 2/3] mm: Support tlbbatch flush for a range of PTEs
config: riscv-randconfig-001-20250106 (https://download.01.org/0day-ci/archive/20250106/202501061736.FoHcInHJ-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250106/202501061736.FoHcInHJ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501061736.FoHcInHJ-lkp@intel.com/
All errors (new ones prefixed by >>):
mm/rmap.c: In function 'set_tlb_ubc_flush_pending':
>> mm/rmap.c:685:9: error: too many arguments to function 'arch_tlbbatch_add_pending'
685 | arch_tlbbatch_add_pending(&tlb_ubc->arch, mm, uaddr, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/riscv/include/asm/pgtable.h:113,
from include/linux/pgtable.h:6,
from include/linux/mm.h:30,
from mm/rmap.c:55:
arch/riscv/include/asm/tlbflush.h:62:6: note: declared here
62 | void arch_tlbbatch_add_pending(struct arch_tlbflush_unmap_batch *batch,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/arch_tlbbatch_add_pending +685 mm/rmap.c
663
664 /*
665 * Bits 0-14 of mm->tlb_flush_batched record pending generations.
666 * Bits 16-30 of mm->tlb_flush_batched bit record flushed generations.
667 */
668 #define TLB_FLUSH_BATCH_FLUSHED_SHIFT 16
669 #define TLB_FLUSH_BATCH_PENDING_MASK \
670 ((1 << (TLB_FLUSH_BATCH_FLUSHED_SHIFT - 1)) - 1)
671 #define TLB_FLUSH_BATCH_PENDING_LARGE \
672 (TLB_FLUSH_BATCH_PENDING_MASK / 2)
673
674 static void set_tlb_ubc_flush_pending(struct mm_struct *mm, pte_t pteval,
675 unsigned long uaddr,
676 unsigned long size)
677 {
678 struct tlbflush_unmap_batch *tlb_ubc = ¤t->tlb_ubc;
679 int batch;
680 bool writable = pte_dirty(pteval);
681
682 if (!pte_accessible(mm, pteval))
683 return;
684
> 685 arch_tlbbatch_add_pending(&tlb_ubc->arch, mm, uaddr, size);
686 tlb_ubc->flush_required = true;
687
688 /*
689 * Ensure compiler does not re-order the setting of tlb_flush_batched
690 * before the PTE is cleared.
691 */
692 barrier();
693 batch = atomic_read(&mm->tlb_flush_batched);
694 retry:
695 if ((batch & TLB_FLUSH_BATCH_PENDING_MASK) > TLB_FLUSH_BATCH_PENDING_LARGE) {
696 /*
697 * Prevent `pending' from catching up with `flushed' because of
698 * overflow. Reset `pending' and `flushed' to be 1 and 0 if
699 * `pending' becomes large.
700 */
701 if (!atomic_try_cmpxchg(&mm->tlb_flush_batched, &batch, 1))
702 goto retry;
703 } else {
704 atomic_inc(&mm->tlb_flush_batched);
705 }
706
707 /*
708 * If the PTE was dirty then it's best to assume it's writable. The
709 * caller must use try_to_unmap_flush_dirty() or try_to_unmap_flush()
710 * before the page is queued for IO.
711 */
712 if (writable)
713 tlb_ubc->writable = true;
714 }
715
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists