Skip to content

memcg: variable type fixes

Johannes Weiner linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 21 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4memcg: use native word to represent dirtyable pagesmm/memcontrol.c+5 -45 replies
2/4memcg: catch negative per-cpu sums in dirty infomm/memcontrol.c+6 -53 replies
3/4memcg: break out event counters from other statsmm/memcontrol.c+37 -123 replies
4/4memcg: use native word page statistics countersinclude/linux/memcontrol.h mm/memcontrol.c mm/page-writeback.c+24 -2510 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchMinchan KimGreg ThelenKAMEZAWA Hiroyuki
1/4R-b R-b A-b
2/4R-b R-b A-b
3/4R-b R-b A-b
4/4R-b R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [patch 0/4] memcg: variable type fixes

Hi Greg,

it is not the res counter primitives, these are our own counters. We have to keep signed types for most counters, as the per-cpu counter folding can race and we end up with negative values.

The fix for the original issue is in patch 1. There are no casts needed, the range is checked to be sane and then converted to the unsigned type through assignment.

Patch 2, also a type fix, ensures we catch accounting races properly. It is unrelated, but also important.

Patch 3 implements the idea that we only have to used signed types for _some_ of the counters, but not for constant event counters where the sign-bit would be a waste.

Patch 4 converts our fundamental page statistics counters to native words as these should be wide enough for the expected values.

Hannes

--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>