From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android14-kiwi-6.1 249/249] mm/memory.c:5148: warning: Function parameter or member 'mm' not described in 'mm_account_fault'
Date: Fri, 14 Feb 2025 20:09:41 +0800 [thread overview]
Message-ID: <202502142006.SCbQkTrm-lkp@intel.com> (raw)
tree: https://android.googlesource.com/kernel/common android14-kiwi-6.1
head: d2ae202da688a9a795c238142e01da921b3e4b81
commit: a264d8efcb8f7231898dc4cb306ef8e20e6e285e [249/249] BACKPORT: mm: do not increment pgfault stats when page fault handler retries
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20250214/202502142006.SCbQkTrm-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250214/202502142006.SCbQkTrm-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502142006.SCbQkTrm-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/memory.c:1714: warning: Function parameter or member 'start_t' not described in 'unmap_vmas'
mm/memory.c:1714: warning: Function parameter or member 'end_t' not described in 'unmap_vmas'
mm/memory.c:1714: warning: Function parameter or member 'mm_wr_locked' not described in 'unmap_vmas'
>> mm/memory.c:5148: warning: Function parameter or member 'mm' not described in 'mm_account_fault'
vim +5148 mm/memory.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 5129
bce617edecada0 Peter Xu 2020-08-11 5130 /**
f0953a1bbaca71 Ingo Molnar 2021-05-06 5131 * mm_account_fault - Do page fault accounting
bce617edecada0 Peter Xu 2020-08-11 5132 *
bce617edecada0 Peter Xu 2020-08-11 5133 * @regs: the pt_regs struct pointer. When set to NULL, will skip accounting
bce617edecada0 Peter Xu 2020-08-11 5134 * of perf event counters, but we'll still do the per-task accounting to
bce617edecada0 Peter Xu 2020-08-11 5135 * the task who triggered this page fault.
bce617edecada0 Peter Xu 2020-08-11 5136 * @address: the faulted address.
bce617edecada0 Peter Xu 2020-08-11 5137 * @flags: the fault flags.
bce617edecada0 Peter Xu 2020-08-11 5138 * @ret: the fault retcode.
bce617edecada0 Peter Xu 2020-08-11 5139 *
f0953a1bbaca71 Ingo Molnar 2021-05-06 5140 * This will take care of most of the page fault accounting. Meanwhile, it
bce617edecada0 Peter Xu 2020-08-11 5141 * will also include the PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN] perf counter
f0953a1bbaca71 Ingo Molnar 2021-05-06 5142 * updates. However, note that the handling of PERF_COUNT_SW_PAGE_FAULTS should
bce617edecada0 Peter Xu 2020-08-11 5143 * still be in per-arch page fault handlers at the entry of page fault.
bce617edecada0 Peter Xu 2020-08-11 5144 */
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5145 static inline void mm_account_fault(struct mm_struct *mm, struct pt_regs *regs,
bce617edecada0 Peter Xu 2020-08-11 5146 unsigned long address, unsigned int flags,
bce617edecada0 Peter Xu 2020-08-11 5147 vm_fault_t ret)
bce617edecada0 Peter Xu 2020-08-11 @5148 {
bce617edecada0 Peter Xu 2020-08-11 5149 bool major;
bce617edecada0 Peter Xu 2020-08-11 5150
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5151 /* Incomplete faults will be accounted upon completion. */
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5152 if (ret & VM_FAULT_RETRY)
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5153 return;
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5154
bce617edecada0 Peter Xu 2020-08-11 5155 /*
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5156 * To preserve the behavior of older kernels, PGFAULT counters record
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5157 * both successful and failed faults, as opposed to perf counters,
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5158 * which ignore failed cases.
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5159 */
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5160 count_vm_event(PGFAULT);
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5161 count_memcg_event_mm(mm, PGFAULT);
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5162
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5163 /*
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5164 * Do not account for unsuccessful faults (e.g. when the address wasn't
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5165 * valid). That includes arch_vma_access_permitted() failing before
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5166 * reaching here. So this is not a "this many hardware page faults"
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5167 * counter. We should use the hw profiling for that.
bce617edecada0 Peter Xu 2020-08-11 5168 */
a264d8efcb8f72 Suren Baghdasaryan 2023-04-19 5169 if (ret & VM_FAULT_ERROR)
bce617edecada0 Peter Xu 2020-08-11 5170 return;
bce617edecada0 Peter Xu 2020-08-11 5171
bce617edecada0 Peter Xu 2020-08-11 5172 /*
bce617edecada0 Peter Xu 2020-08-11 5173 * We define the fault as a major fault when the final successful fault
bce617edecada0 Peter Xu 2020-08-11 5174 * is VM_FAULT_MAJOR, or if it retried (which implies that we couldn't
bce617edecada0 Peter Xu 2020-08-11 5175 * handle it immediately previously).
bce617edecada0 Peter Xu 2020-08-11 5176 */
bce617edecada0 Peter Xu 2020-08-11 5177 major = (ret & VM_FAULT_MAJOR) || (flags & FAULT_FLAG_TRIED);
bce617edecada0 Peter Xu 2020-08-11 5178
a2beb5f1efede6 Peter Xu 2020-08-11 5179 if (major)
a2beb5f1efede6 Peter Xu 2020-08-11 5180 current->maj_flt++;
a2beb5f1efede6 Peter Xu 2020-08-11 5181 else
a2beb5f1efede6 Peter Xu 2020-08-11 5182 current->min_flt++;
a2beb5f1efede6 Peter Xu 2020-08-11 5183
bce617edecada0 Peter Xu 2020-08-11 5184 /*
a2beb5f1efede6 Peter Xu 2020-08-11 5185 * If the fault is done for GUP, regs will be NULL. We only do the
a2beb5f1efede6 Peter Xu 2020-08-11 5186 * accounting for the per thread fault counters who triggered the
a2beb5f1efede6 Peter Xu 2020-08-11 5187 * fault, and we skip the perf event updates.
bce617edecada0 Peter Xu 2020-08-11 5188 */
bce617edecada0 Peter Xu 2020-08-11 5189 if (!regs)
bce617edecada0 Peter Xu 2020-08-11 5190 return;
bce617edecada0 Peter Xu 2020-08-11 5191
a2beb5f1efede6 Peter Xu 2020-08-11 5192 if (major)
bce617edecada0 Peter Xu 2020-08-11 5193 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
a2beb5f1efede6 Peter Xu 2020-08-11 5194 else
bce617edecada0 Peter Xu 2020-08-11 5195 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
bce617edecada0 Peter Xu 2020-08-11 5196 }
bce617edecada0 Peter Xu 2020-08-11 5197
:::::: The code at line 5148 was first introduced by commit
:::::: bce617edecada007aee8610fbe2c14d10b8de2f6 mm: do page fault accounting in handle_mm_fault
:::::: TO: Peter Xu <peterx@redhat.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-02-14 12:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202502142006.SCbQkTrm-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.