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: <a20f17c4b1b5fdfade3f48375d148e97bd162dd6.camel@gmx.de>
Date:   Tue, 30 Nov 2021 11:14:32 +0100
From:   Mike Galbraith <efault@....de>
To:     Mel Gorman <mgorman@...hsingularity.net>,
        Alexey Avramov <hakavlad@...ox.lv>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Rik van Riel <riel@...riel.com>,
        Darrick Wong <djwong@...nel.org>, regressions@...ts.linux.dev,
        Linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Linux-MM <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] mm: vmscan: Reduce throttling due to a failure to
 make progress

On Mon, 2021-11-29 at 15:01 +0000, Mel Gorman wrote:
> On Sat, Nov 27, 2021 at 01:12:46AM +0900, Alexey Avramov wrote:
> > > After the patch, the test gets killed after roughly 15 seconds which is
> > > the same length of time taken in 5.15.
> > 
> > In my tests, the 5.15 still performs much better.
> > 
> > New question: is timeout=1 has sense? Will it save CPU?
> 
> Ok, the following on top of 5.16-rc1 survived 8 minutes of watching youtube
> on a laptop while "tail /dev/zero" was running within the background. While
> there were some very short glitches, they were no worse than 5.15. I've
> not reproduced your exact test case yet or the memcg ones yet but sending
> now in case I don't complete them before the end of the day.
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index fb9584641ac7..1af12072f40e 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1021,6 +1021,39 @@ static void handle_write_error(struct address_space *mapping,
>         unlock_page(page);
>  }
>  
> +bool skip_throttle_noprogress(pg_data_t *pgdat)
> +{
> +       int reclaimable = 0, write_pending = 0;
> +       int i;
> +
> +       /*
> +        * If kswapd is disabled, reschedule if necessary but do not
> +        * throttle as the system is likely near OOM.
> +        */
> +       if (pgdat->kswapd_failures >= MAX_RECLAIM_RETRIES)
> +               return true;
> +
> +       /*
> +        * If there are a lot of dirty/writeback pages then do not
> +        * throttle as throttling will occur when the pages cycle
> +        * towards the end of the LRU if still under writeback.
> +        */
> +       for (i = 0; i < MAX_NR_ZONES; i++) {
> +               struct zone *zone = pgdat->node_zones + i;
> +
> +               if (!populated_zone(zone))
> +                       continue;
> +
> +               reclaimable += zone_reclaimable_pages(zone);
> +               write_pending += zone_page_state_snapshot(zone,
> +                                                 NR_ZONE_WRITE_PENDING);
> +       }
> +       if (2 * write_pending <= reclaimable)

That is always true here...

	-Mike

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ