Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753335AbbHGMsp (ORCPT ); Fri, 7 Aug 2015 08:48:45 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:41666 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753117AbbHGMsn (ORCPT ); Fri, 7 Aug 2015 08:48:43 -0400 X-AuditID: cbfee690-f796f6d000005054-3e-55c4a929e766 From: PINTU KUMAR To: "'Michal Hocko'" Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, minchan@kernel.org, dave@stgolabs.net, koct9i@gmail.com, mgorman@suse.de, vbabka@suse.cz, js1304@gmail.com, hannes@cmpxchg.org, alexander.h.duyck@redhat.com, sasha.levin@oracle.com, cl@linux.com, fengguang.wu@intel.com, cpgs@samsung.com, pintu_agarwal@yahoo.com, pintu.k@outlook.com, vishnu.ps@samsung.com, rohit.kr@samsung.com References: <1438931334-25894-1-git-send-email-pintu.k@samsung.com> <20150807074422.GE26566@dhcp22.suse.cz> In-reply-to: <20150807074422.GE26566@dhcp22.suse.cz> Subject: RE: [PATCH 1/1] mm: vmstat: introducing vm counter for slowpath Date: Fri, 07 Aug 2015 18:16:47 +0530 Message-id: <0f2101d0d10f$594e4240$0beac6c0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQFaNvMwsNOv9/J1Si/Msok5+J2pJQL1BaZPntW6BxA= Content-language: en-us X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0iTYRTm3fft2+do9Lo030xLFhUJmfdeK0qI4C0QjC50+WFrfUxrN7Zl dsGWUaiIZVbWZjKKwuZqNaXMNHRqKhYmGmnmcFEumWtkOBLF0s3Af8855znP8xw4LCVu5Eey OSo9p1VJFRJGSFvDkvM3bnjcdiDe7FqDK21WBs/MVtD4k38c4DHHBlwzaAXY57ZRuMaege82 3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recEKOLpR0y9ETVxWFuuxDcnT40zuA/P3nCHTua4BGbcVP5Ki/9wWNfHv2kui05wWBbLss AB2xeMHiSNz0MUDg61YvjU/f+CDDzpoSCjv7DtG4pfIHid+0V8jw57fPSVzvf0/gwM2nFLZc rgH4qG0nflDtoXH9/e34i3MatlqbZKnsejNYmCPwWYIpRhAz87JyxexkbsXa9KXpCYlqjUqT hOZzMSJvFJK5ZStTVctzDcHZuZgi3lAYLKXyksTNW/R/gj5tuQr9Ma5TrUpb89cTr/7nbLSD nJf+u7L8S1O2eMtrKDOojioFEQxkdbD42RU6zBPhwy4HVQpGM0r2LIC7r7bJw5deABu+t5Cl gGEodjZsvqUIGSLZWdDsekSHNAR7ioC+zmIQelCyRug74pWFOCL4wx1fIxni8SyG7QOdw3WS nQl7667IQ6xgk+D+/Y+IMI+D3w53DesJNhY6rt+RhXk6rLf3EuFOY+C1Vj8IN7EAttvafuuj 4KHuV3QZUFpHRFlHRFlHRFlHWKoBWQOgkJ+ZL2VkG+NFYfNciTdKhWL23Mw8oxMMr+G7yddA kyvFDVgGcGMUGweb9Eo5XyRtNboBZAguUlFm8+iViix+6zbBlJduKjQIkhskBIctJ6InZOYF l1osSNdodfMTtAlJOqRLTOKiFPN0Tr2SzeYLhE2CkC+Y/vhkTES0GWx4aGis2hkbqD+4b2BN x89RLt0ZW8Mi7erXzrpWbw/dZ9cdSymR9+kzpjIzOsqGFB5U6j/g2BG3efvUGffSHlfGi2Dy JIu2Ow72vM7VmOvq3oKhhosV8WkUQGOjWyvtiVp1xPuB848fJFt/LplUO7Nok6u8WZ3SYjp5 fsptt4UjpRxeE0uYJP4X0SPojZwDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3789 Lines: 94 Hi, > -----Original Message----- > From: Michal Hocko [mailto:mhocko@kernel.org] > Sent: Friday, August 07, 2015 1:14 PM > To: Pintu Kumar > Cc: akpm@linux-foundation.org; linux-kernel@vger.kernel.org; linux- > mm@kvack.org; minchan@kernel.org; dave@stgolabs.net; koct9i@gmail.com; > mgorman@suse.de; vbabka@suse.cz; js1304@gmail.com; > hannes@cmpxchg.org; alexander.h.duyck@redhat.com; > sasha.levin@oracle.com; cl@linux.com; fengguang.wu@intel.com; > cpgs@samsung.com; pintu_agarwal@yahoo.com; pintu.k@outlook.com; > vishnu.ps@samsung.com; rohit.kr@samsung.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 > -- > Michal Hocko > SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/