linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm: reduce /proc/pagetypeinfo ovehead
@ 2019-10-25  7:26 Michal Hocko
  2019-10-25  7:26 ` [PATCH 1/2] mm, vmstat: hide /proc/pagetypeinfo from normal users Michal Hocko
  2019-10-25  7:26 ` [PATCH 2/2] mm, vmstat: reduce zone->lock holding time by /proc/pagetypeinfo Michal Hocko
  0 siblings, 2 replies; 10+ messages in thread
From: Michal Hocko @ 2019-10-25  7:26 UTC (permalink / raw)
  To: Andrew Morton, Mel Gorman, Waiman Long
  Cc: Johannes Weiner, Roman Gushchin, Vlastimil Babka,
	Konstantin Khlebnikov, Jann Horn, Song Liu, Greg Kroah-Hartman,
	Rafael Aquini, linux-mm, LKML

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/20191022162156.17316-1-longman@redhat.com
[2] http://lkml.kernel.org/r/20191023102737.32274-1-mhocko@kernel.org



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-10-25 21:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25  7:26 [PATCH 0/2] mm: reduce /proc/pagetypeinfo ovehead Michal Hocko
2019-10-25  7:26 ` [PATCH 1/2] mm, vmstat: hide /proc/pagetypeinfo from normal users Michal Hocko
2019-10-25  7:33   ` Vlastimil Babka
2019-10-25 21:58     ` Andrew Morton
2019-10-25  8:18   ` David Hildenbrand
2019-10-25  7:26 ` [PATCH 2/2] mm, vmstat: reduce zone->lock holding time by /proc/pagetypeinfo Michal Hocko
2019-10-25  7:35   ` Vlastimil Babka
2019-10-25  8:21   ` David Hildenbrand
2019-10-25 12:52   ` Rafael Aquini
2019-10-25 21:08   ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox