Defined in 2 files as a function:
- include/linux/percpu_counter.h, line 118 (as a function)
- include/linux/percpu_counter.h, line 240 (as a function)
Referenced in 23 files:
- drivers/md/dm-crypt.c
- fs/btrfs/space-info.c
- fs/btrfs/super.c, line 2429
- fs/ext2/balloc.c, line 1162
- fs/ext2/ialloc.c
- fs/ext4/balloc.c
- fs/ext4/extents_status.c
- fs/ext4/ialloc.c
- fs/ext4/inode.c
- fs/file_table.c, line 113
- fs/jbd2/journal.c
- fs/quota/dquot.c, line 832
- fs/xfs/libxfs/xfs_ialloc.c
- fs/xfs/xfs_ioctl.c
- fs/xfs/xfs_mount.h, line 748
- include/linux/backing-dev.h, line 71
- include/linux/mm.h, line 3454
- include/linux/percpu_counter.h, line 247
- include/net/dst_ops.h, line 48
- include/net/sock.h, line 1467
- io_uring/wait.c, line 52
- lib/flex_proportions.c
- mm/util.c, line 994
Smatch caller information:
kernel/exit.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &system_transition_mutex |
kernel/fork.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
mm/madvise.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &madv_behavior->mm->mmap_lock | ||
| HALF_LOCKED2 | &mm->mmap_lock |
kernel/tsacct.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING |
mm/page-writeback.c wb_stat() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &pool->lock | ||
| HALF_LOCKED2 | &wb->list_lock |
fs/btrfs/space-info.c need_preemptive_reclaim() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &space_info->lock | ||
| TYPE_LOCK | (struct btrfs_space_info)->lock |
fs/btrfs/space-info.c need_preemptive_reclaim() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &space_info->lock | ||
| TYPE_LOCK | (struct btrfs_space_info)->lock |
fs/ext2/ialloc.c find_group_orlov() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/ext2/ialloc.c find_group_orlov() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/ext2/ialloc.c find_group_orlov() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/quota/dquot.c dqcache_shrink_count() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| BUF_SIZE | 0 | fbc | 208 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &m->lock |
mm/backing-dev.c wb_stat() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &m->lock | ||
| LOCK2 | rcu_read | ||
| TYPE_LOCK | (struct seq_file)->lock |
fs/proc/task_mmu.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| LOCK2 | &mm->mmap_lock | ||
| TYPE_LOCK | (struct mm_struct)->mmap_lock |
mm/rmap.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &anon_vma->root->rwsem | ||
| HALF_LOCKED2 | &folio->private->lock |
mm/util.c __vm_enough_memory() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 7602378050297823232 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &mm->mmap_lock | ||
| HALF_LOCKED2 | &mm->mmap_lock | ||
| HALF_LOCKED2 | &vma->anon_vma->root->rwsem | ||
| HALF_LOCKED2 | global &swap_lock |
fs/ext4/inode.c ext4_nonda_switch() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &mapping->invalidate_lock |
fs/ext4/inode.c ext4_nonda_switch() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &mapping->invalidate_lock |
net/core/dst.c dst_entries_get_fast() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | rcu_read |
io_uring/wait.c current_pending_io() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
fs/ext4/ialloc.c find_group_orlov() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/ext4/ialloc.c find_group_orlov() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/ext4/ialloc.c find_group_orlov() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/file_table.c get_nr_files() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 6586958506563112960 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/proc/array.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &m->lock | ||
| LOCK2 | &task->signal->exec_update_lock | ||
| TYPE_LOCK | (struct seq_file)->lock | ||
| TYPE_LOCK | (struct signal_struct)->exec_update_lock |
fs/ext4/extents_status.c ext4_es_count() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &m->lock |
fs/ext4/extents_status.c ext4_es_scan() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &bch_register_lock |
fs/ext4/extents_status.c ext4_es_scan() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &bch_register_lock |
mm/vma.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &mm->mmap_lock | ||
| HALF_LOCKED2 | &oldmm->mmap_lock |
fs/xfs/xfs_iomap.c xfs_estimate_freecounter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &inode->i_rwsem |
fs/xfs/libxfs/xfs_ialloc.c xfs_dialloc() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/xfs/libxfs/xfs_ialloc.c xfs_estimate_freecounter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/xfs/libxfs/xfs_ialloc.c xfs_ialloc_ag_alloc() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/jbd2/journal.c jbd2_journal_shrink_count() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &m->lock |
fs/jbd2/journal.c jbd2_journal_shrink_scan() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &bch_register_lock |
fs/jbd2/journal.c jbd2_journal_shrink_scan() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &bch_register_lock |
fs/xfs/xfs_zone_gc.c xfs_estimate_freecounter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &m->lock | ||
| HALF_LOCKED2 | &zi->zi_open_zones_lock |
mm/memory.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &mapping->i_mmap_rwsem |
kernel/sched/fair.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING |
lib/flex_proportions.c fprop_fraction_percpu() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &(&mapping->i_pages)->xa_lock | ||
| HALF_LOCKED2 | flags |
lib/flex_proportions.c fprop_fraction_percpu() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 72,4096-ptr_max |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &(&mapping->i_pages)->xa_lock | ||
| HALF_LOCKED2 | flags |
net/core/sock.c sk_sockets_allocated_read_positive() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &kcm->tx_mutex | ||
| HALF_LOCKED2 | &list->lock | ||
| HALF_LOCKED2 | &psock->work_mutex | ||
| HALF_LOCKED2 | &sk->sk_lock.slock | ||
| HALF_LOCKED2 | sk |
fs/ext2/balloc.c ext2_has_free_blocks() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &ei->truncate_mutex |
drivers/md/dm-crypt.c crypt_alloc_buffer() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &cc->bio_alloc_lock |
drivers/md/dm-crypt.c crypt_page_alloc() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
kernel/sys.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/btrfs/super.c btrfs_nr_cached_objects() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | &sb->s_umount |
fs/xfs/xfs_ioctl.c xfs_estimate_freecounter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|
fs/xfs/xfs_ioctl.c xfs_ioctl_fs_counts() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
fs/xfs/xfs_ioctl.c xfs_ioctl_fs_counts() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
fs/ext4/balloc.c ext4_has_free_clusters() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| BUF_SIZE | 0 | fbc | 104 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/ext4/balloc.c ext4_has_free_clusters() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| BUF_SIZE | 0 | fbc | 104 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING |
fs/exec.c get_mm_counter() -> percpu_counter_read_positive()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | fbc | 4096-ptr_max |
| PREEMPT_ADD | |||
| HALF_LOCKED2 | &tsk->signal->exec_update_lock |