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:	Mon, 5 May 2008 14:21:15 +0900
From:	"minchan Kim" <barrioskmc@...il.com>
To:	"KOSAKI Motohiro" <kosaki.motohiro@...fujitsu.com>
Cc:	LKML <linux-kernel@...r.kernel.org>, linux-mm <linux-mm@...ck.org>,
	"Andrew Morton" <akpm@...ux-foundation.org>
Subject: Re: [-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
--
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