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-next>] [day] [month] [year] [list]
Message-ID: <473B69D5.2050805@cosmosbay.com>
Date:	Wed, 14 Nov 2007 22:34:13 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	"David S. Miller" <davem@...emloft.net>
CC:	Linux Netdev List <netdev@...r.kernel.org>
Subject: [PATCH] NET : rt_check_expire() can take a long time, add a cond_resched()

On commit 39c90ece7565f5c47110c2fa77409d7a9478bd5b we converted 
rt_check_expire() from softirq to workqueue, allowing the function to perform 
all work it was supposed to do.

When the IP route cache is big, rt_check_expire() can take a long time to run.
(default settings : 20% of the hash table is scanned at each invocation)

Adding cond_resched() helps giving cpu to higher priority tasks if necessary.

Using a "if (need_resched())" test before calling "cond_resched();" is 
necessary to avoid spending too much time doing the resched check.
(My tests gave a time reduction from 88 ms to 25 ms per rt_check_expire() run 
on my i686 test machine)

Signed-off-by: Eric Dumazet <dada1@...mosbay.com>


View attachment "rt_check_expire_resched.patch" of type "text/plain" (388 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ