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; 14+ 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] 14+ messages in thread
* Re:  [PATCH 2/2] mm, vmstat: reduce zone->lock holding time by /proc/pagetypeinfo
@ 2019-10-25 11:18 Qian Cai
  2019-10-25 11:43 ` Michal Hocko
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Qian Cai @ 2019-10-25 11:18 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Andrew Morton, Mel Gorman, Waiman Long, Johannes Weiner,
	Roman Gushchin, Vlastimil Babka, Konstantin Khlebnikov,
	Jann Horn, Song Liu, Greg Kroah-Hartman, Rafael Aquini, linux-mm,
	LKML, Michal Hocko



> On Oct 25, 2019, at 3:26 AM, Michal Hocko <mhocko@kernel.org> wrote:
> 
> Considering the pagetypeinfo is a debugging tool we do not really need
> exact numbers here. The primary reason to look at the outuput is to see
> how pageblocks are spread among different migratetypes and low number of
> pages is much more interesting therefore putting a bound on the number
> of pages on the free_list sounds like a reasonable tradeoff.
> 
> The new output will simply tell
> [...]
> Node    6, zone   Normal, type      Movable >100000 >100000 >100000 >100000  41019  31560  23996  10054   3229    983    648

It was mentioned that developers could use this file is to see the movement of those numbers for debugging, so this supposed to introduce regressions as there is no movement anymore for those 100k+ items?

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

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

Thread overview: 14+ 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
2019-10-25 11:18 Qian Cai
2019-10-25 11:43 ` Michal Hocko
2019-10-25 12:00 ` Mel Gorman
2019-10-25 21:25 ` Andrew Morton

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