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]
Date:   Tue, 3 Jan 2017 21:43:33 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
        Mel Gorman <mgorman@...e.de>,
        Johannes Weiner <hannes@...xchg.org>,
        Rik van Riel <riel@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/7] mm, vmscan: show the number of skipped pages in
 mm_vmscan_lru_isolate

On Tue 03-01-17 18:21:48, Vlastimil Babka wrote:
> On 12/28/2016 04:30 PM, Michal Hocko wrote:
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -1428,6 +1428,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
> >  	unsigned long nr_taken = 0;
> >  	unsigned long nr_zone_taken[MAX_NR_ZONES] = { 0 };
> >  	unsigned long nr_skipped[MAX_NR_ZONES] = { 0, };
> > +	unsigned long skipped = 0, total_skipped = 0;
> >  	unsigned long scan, nr_pages;
> >  	LIST_HEAD(pages_skipped);
> > 
> > @@ -1479,14 +1480,13 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
> >  	 */
> >  	if (!list_empty(&pages_skipped)) {
> >  		int zid;
> > -		unsigned long total_skipped = 0;
> > 
> >  		for (zid = 0; zid < MAX_NR_ZONES; zid++) {
> >  			if (!nr_skipped[zid])
> >  				continue;
> > 
> >  			__count_zid_vm_events(PGSCAN_SKIP, zid, nr_skipped[zid]);
> > -			total_skipped += nr_skipped[zid];
> > +			skipped += nr_skipped[zid];
> >  		}
> > 
> >  		/*
> > @@ -1494,13 +1494,13 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
> >  		 * close to unreclaimable. If the LRU list is empty, account
> >  		 * skipped pages as a full scan.
> >  		 */
> > -		scan += list_empty(src) ? total_skipped : total_skipped >> 2;
> > +		total_skipped = list_empty(src) ? skipped : skipped >> 2;
> 
> Should the tracepoint output reflect this halving heuristic or rather report
> the raw data? Or is each variant inferrable from the other?

I would rather see the raw data because you can always go and check the
_current_ implementation and calculate the heuristic.

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ