Skip to content

percpu: fix block iterators and reserved chunk stats

Dennis Zhou linux-mm lkml 1 version Applied

Status from this message: Applied to percpu/for-4.14-fixes.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2percpu: fix starting offset for chunk statistics traversalmm/percpu-stats.c+1 -11 reply
2/2percpu: fix iteration to prevent skipping over blockmm/percpu.c+4 -03 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchLuis Henriques
1/2
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] percpu: fix block iterators and reserved chunk stats

Hi everyone,

This patchset includes two bug fixes related to bitmap percpu memory allocator.

The first is a problem with how the start offset is managed in bytes, but the bitmaps are traversed in bits. The start offset is maintained to keep alignment true within the actual allocation area in the chunk. With the reserved and dynamic chunk, this may unintentionally skip over a portion proportional to the start offset and PCPU_MIN_ALLOC_SIZE.

The second is an issue reported by Luis in [1]. The allocator was unable to allocate from the reserved chunk due to the block offset not being reset within the iterator. This caused subsequently checked blocks to check against a potentially higher block offset. This may lead the iterator to believe it had checked this area in the prior iteration. The fix is to simply reset the block offset to 0 after it is used allowing the predicate to always evaluate to true for subsequent blocks.

[1] https://lkml.org/lkml/2017/9/26/506

This patchset contains the following 2 patches:
0001-percpu-fix-starting-offset-for-chunk-statistics-trav.patch 0002-percpu-fix-iteration-to-prevent-skipping-over-block.patch

0001 fixes the chunk start offset issue. 0002 fixes the iteration bug.

This patchset is on top of linus#v4.14-rc2 e19b205be4.

diffstats below:

Dennis Zhou (2):
percpu: fix starting offset for chunk statistics traversal
percpu: fix iteration to prevent skipping over block

 mm/percpu-stats.c | 2 +-
 mm/percpu.c       | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

Thanks,
Dennis

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>