lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <0f2101d0d10f$594e4240$0beac6c0$@samsung.com>
Date:	Fri, 07 Aug 2015 18:16:47 +0530
From:	PINTU KUMAR <pintu.k@...sung.com>
To:	'Michal Hocko' <mhocko@...nel.org>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, minchan@...nel.org, dave@...olabs.net,
	koct9i@...il.com, mgorman@...e.de, vbabka@...e.cz,
	js1304@...il.com, hannes@...xchg.org, alexander.h.duyck@...hat.com,
	sasha.levin@...cle.com, cl@...ux.com, fengguang.wu@...el.com,
	cpgs@...sung.com, pintu_agarwal@...oo.com, pintu.k@...look.com,
	vishnu.ps@...sung.com, rohit.kr@...sung.com
Subject: RE: [PATCH 1/1] mm: vmstat: introducing vm counter for slowpath

Hi,

> -----Original Message-----
> From: Michal Hocko [mailto:mhocko@...nel.org]
> Sent: Friday, August 07, 2015 1:14 PM
> To: Pintu Kumar
> Cc: akpm@...ux-foundation.org; linux-kernel@...r.kernel.org; linux-
> mm@...ck.org; minchan@...nel.org; dave@...olabs.net; koct9i@...il.com;
> mgorman@...e.de; vbabka@...e.cz; js1304@...il.com;
> hannes@...xchg.org; alexander.h.duyck@...hat.com;
> sasha.levin@...cle.com; cl@...ux.com; fengguang.wu@...el.com;
> cpgs@...sung.com; pintu_agarwal@...oo.com; pintu.k@...look.com;
> vishnu.ps@...sung.com; rohit.kr@...sung.com
> Subject: Re: [PATCH 1/1] mm: vmstat: introducing vm counter for slowpath
> 
> On Fri 07-08-15 12:38:54, Pintu Kumar wrote:
> > This patch add new counter slowpath_entered in /proc/vmstat to track
> > how many times the system entered into slowpath after first allocation
> > attempt is failed.
> 
> This is too lowlevel to be exported in the regular user visible interface IMO.
> 
I think its ok because I think this interface is for lowlevel debugging itself.

> > This is useful to know the rate of allocation success within the
> > slowpath.
> 
> What would be that information good for? Is a regular administrator expected
to
> consume this value or this is aimed more to kernel developers? If the later
then I
> think a trace point sounds like a better interface.
> 
This information is good for kernel developers.
I found this information useful while debugging low memory situation and
sluggishness behavior.
I wanted to know how many times the first allocation is failing and how many
times system entering slowpath.
As I said, the existing counter does not give this information clearly. 
The pageoutrun, allocstall is too confusing.
Also, if kswapd and compaction is disabled, we have no other counter for
slowpath (except allocstall).
Another problem is that allocstall can also be incremented from hibernation
during shrink_all_memory calling.
Which may create more confusion.
Thus I found this interface useful to understand low memory behavior.
If device sluggishness is happening because of too many slowpath or due to some
other problem.
Then we can decide what will be the best memory configuration for my device to
reduce the slowpath.

Regarding trace points, I am not sure if we can attach counter to it.
Also trace may have more over-head and requires additional configs to be enabled
to debug.
Mostly these configs will not be enabled by default (at least in embedded, low
memory device).
I found the vmstat interface more easy and useful.

Comments and suggestions are welcome.

> > This patch is tested on ARM with 512MB RAM.
> > A sample output is shown below after successful boot-up:
> > shell> cat /proc/vmstat
> > nr_free_pages 4712
> > pgalloc_normal 1319432
> > pgalloc_movable 0
> > pageoutrun 379
> > allocstall 0
> > slowpath_entered 585
> > compact_stall 0
> > compact_fail 0
> > compact_success 0
> >
> > >From the above output we can see that the system entered
> > slowpath 585 times.
> > But the existing counter kswapd(pageoutrun),
> > direct_reclaim(allocstall),
> > direct_compact(compact_stall) does not tell this value.
> > >From the above value, it clearly indicates that the system have
> > entered slowpath 585 times. Out of which 379 times allocation passed
> > through kswapd, without performing direct reclaim/compaction.
> > That means the remaining 206 times the allocation would have succeeded
> > using the alloc_pages_high_priority.
> >
> > Signed-off-by: Pintu Kumar <pintu.k@...sung.com>
> --
> Michal Hocko
> SUSE Labs

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ