lkml.org 
[lkml]   [2008]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [-mm][PATCH 4/5] core of reclaim throttle
>  @@ -120,6 +125,7 @@ struct scan_control {
> int vm_swappiness = 60;
> long vm_total_pages; /* The total number of pages which the VM controls */
>
> +#define MAX_RECLAIM_TASKS CONFIG_NR_MAX_RECLAIM_TASKS_PER_ZONE
> static LIST_HEAD(shrinker_list);
> static DECLARE_RWSEM(shrinker_rwsem);
>
> @@ -1187,7 +1193,46 @@ static int shrink_zone(int priority, str
>
> unsigned long nr_inactive;
> unsigned long nr_to_scan;
> unsigned long nr_reclaimed = 0;
> + int ret = 0;
> + int throttle_on = 0;
> + unsigned long freed;
> + unsigned long threshold;
>
> +
> + /* avoid recursing wait_evnet */
> + if (current->flags & PF_RECLAIMING)
> + goto shrinking;
> +
> + throttle_on = 1;
> + current->flags |= PF_RECLAIMING;
> + wait_event(zone->reclaim_throttle_waitq,
> + atomic_add_unless(&zone->nr_reclaimers, 1, MAX_RECLAIM_TASKS));
> +
> + /* in some situation (e.g. hibernation), shrink processing shouldn't be
> + cut off even though large memory freeded. */
> + if (!sc->may_cut_off)
> + goto shrinking;
> +

where do you initialize may_cut_off ?
Current Implementation, may_cut_off is always "0" so always goto shrinking
--
Thanks,
barrios


\
 
 \ /
  Last update: 2008-05-05 07:23    [W:0.052 / U:4.380 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site