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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to