Skip to content

Commit ac43877

Browse files
committed
Merge branch 'for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu
Pull percpu updates from Dennis Zhou: "This is just a few documentation fixes for percpu refcount and bitmap helpers that went in v5.6, and moving my emails to all be at korg" * 'for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: percpu: update copyright emails to [email protected] include/bitmap.h: add new functions to documentation include/bitmap.h: add missing parameter in docs percpu_ref: Fix comment regarding percpu_ref_init flags
2 parents 8c1b724 + bfacd38 commit ac43877

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

include/linux/bitmap.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@
5050
* bitmap_set(dst, pos, nbits) Set specified bit area
5151
* bitmap_clear(dst, pos, nbits) Clear specified bit area
5252
* bitmap_find_next_zero_area(buf, len, pos, n, mask) Find bit free area
53-
* bitmap_find_next_zero_area_off(buf, len, pos, n, mask) as above
53+
* bitmap_find_next_zero_area_off(buf, len, pos, n, mask, mask_off) as above
54+
* bitmap_next_clear_region(map, &start, &end, nbits) Find next clear region
55+
* bitmap_next_set_region(map, &start, &end, nbits) Find next set region
56+
* bitmap_for_each_clear_region(map, rs, re, start, end)
57+
* Iterate over all clear regions
58+
* bitmap_for_each_set_region(map, rs, re, start, end)
59+
* Iterate over all set regions
5460
* bitmap_shift_right(dst, src, n, nbits) *dst = *src >> n
5561
* bitmap_shift_left(dst, src, n, nbits) *dst = *src << n
5662
* bitmap_cut(dst, src, first, n, nbits) Cut n bits from first, copy rest

lib/percpu-refcount.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ static unsigned long __percpu *percpu_count_ptr(struct percpu_ref *ref)
5050
* @flags: PERCPU_REF_INIT_* flags
5151
* @gfp: allocation mask to use
5252
*
53-
* Initializes @ref. If @flags is zero, @ref starts in percpu mode with a
54-
* refcount of 1; analagous to atomic_long_set(ref, 1). See the
55-
* definitions of PERCPU_REF_INIT_* flags for flag behaviors.
53+
* Initializes @ref. @ref starts out in percpu mode with a refcount of 1 unless
54+
* @flags contains PERCPU_REF_INIT_ATOMIC or PERCPU_REF_INIT_DEAD. These flags
55+
* change the start state to atomic with the latter setting the initial refcount
56+
* to 0. See the definitions of PERCPU_REF_INIT_* flags for flag behaviors.
5657
*
5758
* Note that @release must not sleep - it may potentially be called from RCU
5859
* callback context by percpu_ref_kill().

mm/percpu-stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* mm/percpu-debug.c
44
*
55
* Copyright (C) 2017 Facebook Inc.
6-
* Copyright (C) 2017 Dennis Zhou <[email protected]>
6+
* Copyright (C) 2017 Dennis Zhou <[email protected]>
77
*
88
* Prints statistics about the percpu allocator and backing chunks.
99
*/

mm/percpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (C) 2009 Tejun Heo <[email protected]>
77
*
88
* Copyright (C) 2017 Facebook Inc.
9-
* Copyright (C) 2017 Dennis Zhou <[email protected]>
9+
* Copyright (C) 2017 Dennis Zhou <[email protected]>
1010
*
1111
* The percpu allocator handles both static and dynamic areas. Percpu
1212
* areas are allocated in chunks which are divided into units. There is

0 commit comments

Comments
 (0)