Re: [PATCH 03/10] mm: vmscan: Flatten kswapd priority loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]