Skip to content

mm: reduce /proc/pagetypeinfo ovehead

Michal Hocko linux-mm lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review 1 of 2 applied

Patches in v1 1 of 2 applied

#Subject and filesSizeRepliesApplied
1/2mm, vmstat: hide /proc/pagetypeinfo from normal usersmm/vmstat.c+1 -13 repliesApplied
2/2mm, vmstat: reduce zone->lock holding time by /proc/pagetypeinfomm/vmstat.c+20 -34 replies

Reviews trailers per patch

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

PatchMel GormanVlastimil BabkaWaiman LongRafael AquiniDavid RientjesDavid Hildenbrand
1/2A-b A-b A-b A-b A-b
2/2A-b R-b A-b A-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 6 reviewers.

Read the v1 thread

Cover letter [PATCH 0/2] mm: reduce /proc/pagetypeinfo ovehead

Hi,
Waiman Long has reported [1] that reading /proc/pagetypeinfo can severely interfere with the system and it might lead even to hard lockup detector firing up on a very large machines. Nevertheless small machines are not completely fine either because the operation requires to take the zone->lock IRQ safe spinlock and thus to interfere with both the IRQ delivery and the page allocator. The file is world readable which makes this kinda bad.

The immediate danger is addressed by making the file root readable only. This is a debugging aid so general audience shouldn't require it for a general operation. This is done in the first patch.

The potentially excessive time spent for free_list iteration is handled by capping the iteration loop. This should be fine for existing usecases because low numbers are usually of the primary interest. This is implemented in patch 2.

I am reposting these two patches with dropped RFC (previously posted [2]) and asking for inclusion. I have also dropped Mel's Ack from the second patch because there were quite some changes since he reviewed.

[1] http://lkml.kernel.org/r/[email protected]
[2] http://lkml.kernel.org/r/[email protected]