Bug 8321 - pagecache_limit已回收统计变量未保护
Summary: pagecache_limit已回收统计变量未保护
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: ARCH(unspecified) (show other bugs) ARCH(unspecified)
Version: 5.10.y-16
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: maqiao
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-26 14:52 UTC by tianyucode9603
Modified: 2024-02-26 15:03 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tianyucode9603 2024-02-26 14:52:11 UTC
percpu变量访问未关抢占,内核日志报错

[ 4369.131625] BUG: using __this_cpu_add() in preemptible [00000000] code: readfile/7916
[ 4369.131626] caller is memcg_add_pgcache_limit_reclaimed+0x2c/0x50
[ 4369.131633] CPU: 6 PID: 7916 Comm: readfile Kdump: loaded Tainted: G S                5.10.134 #15
[ 4369.131636] Hardware name: Dell Inc. Precision 3660/0N0992, BIOS 1.0.22 03/14/2022
[ 4369.131637] Call Trace:
[ 4369.131639]  dump_stack+0x57/0x6e
[ 4369.131643]  check_preemption_disabled+0xcc/0xd0
[ 4369.131646]  memcg_add_pgcache_limit_reclaimed+0x2c/0x50
[ 4369.131653]  __pagecache_shrink+0x14f/0x1c0
[ 4369.131659]  __memcg_pagecache_shrink+0xb3/0x150
[ 4369.131666]  memcg_pagecache_shrink+0xa3/0xd0
[ 4369.131672]  __add_to_page_cache_locked+0x3e4/0x480
[ 4369.131679]  ? scan_shadow_nodes+0x30/0x30
[ 4369.131684]  add_to_page_cache_lru+0x48/0xd0
[ 4369.131691]  page_cache_ra_unbounded+0x150/0x230
[ 4369.131699]  generic_file_buffered_read+0x63a/0xad0
[ 4369.131708]  new_sync_read+0x116/0x1b0
[ 4369.131715]  vfs_read+0x14f/0x1b0
[ 4369.131720]  ksys_read+0x65/0xf0
[ 4369.131726]  do_syscall_64+0x30/0x40
[ 4369.131731]  entry_SYSCALL_64_after_hwframe+0x61/0xc6
[ 4369.131736] RIP: 0033:0x7f3dcbbc9222
[ 4369.131738] Code: c0 e9 b2 fe ff ff 50 48 8d 3d 32 c0 0b 00 e8 a5 fe 01 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24
[ 4369.131740] RSP: 002b:00007ffe6b1174e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[ 4369.131743] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3dcbbc9222
[ 4369.131745] RDX: 0000000000400000 RSI: 00007f3dcb6ca010 RDI: 0000000000000003
[ 4369.131747] RBP: 00007ffe6b1175b0 R08: 00007f3dcbcbc550 R09: 0000000000000000
[ 4369.131748] R10: 0000000000000003 R11: 0000000000000246 R12: 00007ffe6b1176e8
[ 4369.131750] R13: 00000000004011a2 R14: 00007f3dcbd0da80 R15: 0000000000403e08
Comment 1 小龙 admin 2024-02-26 15:03:16 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/2780