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: <20130319101219.GC2055@suse.de>
Date:	Tue, 19 Mar 2013 10:12:19 +0000
From:	Mel Gorman <mgorman@...e.de>
To:	Simon Jeons <simon.jeons@...il.com>
Cc:	Linux-MM <linux-mm@...ck.org>, Jiri Slaby <jslaby@...e.cz>,
	Valdis Kletnieks <Valdis.Kletnieks@...edu>,
	Rik van Riel <riel@...hat.com>,
	Zlatko Calusic <zcalusic@...sync.net>,
	Johannes Weiner <hannes@...xchg.org>,
	dormando <dormando@...ia.net>,
	Satoru Moriya <satoru.moriya@....com>,
	Michal Hocko <mhocko@...e.cz>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 03/10] mm: vmscan: Flatten kswapd priority loop

On Tue, Mar 19, 2013 at 07:58:51AM +0800, Simon Jeons wrote:
> >@@ -2672,26 +2677,25 @@ static void kswapd_shrink_zone(struct zone *zone,
> >  static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
> >  							int *classzone_idx)
> >  {
> >-	bool pgdat_is_balanced = false;
> >  	int i;
> >  	int end_zone = 0;	/* Inclusive.  0 = ZONE_DMA */
> >  	unsigned long nr_soft_reclaimed;
> >  	unsigned long nr_soft_scanned;
> >  	struct scan_control sc = {
> >  		.gfp_mask = GFP_KERNEL,
> >+		.priority = DEF_PRIORITY,
> >  		.may_unmap = 1,
> >  		.may_swap = 1,
> >+		.may_writepage = !laptop_mode,
> 
> What's the influence of this change? If there are large numbers of
> anonymous pages and very little file pages, anonymous pages will not
> be swapped out when priorty >= DEF_PRIORITY-2. Just no sense scan.

None. The initialisation just moves from where it was after the
loop_again label to here. See the next hunk.

> >  		.order = order,
> >  		.target_mem_cgroup = NULL,
> >  	};
> >-loop_again:
> >-	sc.priority = DEF_PRIORITY;
> >-	sc.nr_reclaimed = 0;
> >-	sc.may_writepage = !laptop_mode;
> >  	count_vm_event(PAGEOUTRUN);
> >  	do {
> >  		unsigned long lru_pages = 0;
> >+		unsigned long nr_reclaimed = sc.nr_reclaimed;
> >+		bool raise_priority = true;
> >  		/*
> >  		 * Scan in the highmem->dma direction for the highest

-- 
Mel Gorman
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