David Miller a écrit : > From: Eric Dumazet > Date: Fri, 16 Nov 2007 17:40:27 +0100 > >> + unsigned long fake = 0, *flag_ptr; > ... >> + /* >> + * This is a fast version of : >> + * if (process_context && need_resched()) >> + */ >> + if (unlikely(test_bit(TIF_NEED_RESCHED, flag_ptr))) >> + cond_resched(); > > Too much exposure to internals for me to apply this, really. > > I have no problem with the change conceptually at all, this > detail is just too dirty. Fair enough ;) Re-sending this patch from a thunderbird on a winXP machine, I hope you wont mind... Have a nice week end. [PATCH] IPV4 : Move ip route cache flush (secret_rebuild) from softirq to workqueue Every 600 seconds (ip_rt_secret_interval), a softirq flush of the whole ip route cache is triggered. On loaded machines, this can starve softirq for many seconds and can eventually crash. This patch moves this flush to a workqueue context, using the worker we intoduced in commit 39c90ece7565f5c47110c2fa77409d7a9478bd5b (IPV4: Convert rt_check_expire() from softirq processing to workqueue.) Also, immediate flushes (echo 0 >/proc/sys/net/ipv4/route/flush) are using rt_do_flush() helper function, wich take attention to rescheduling. Next step will be to handle delayed flushes ("echo -1 >/proc/sys/net/ipv4/route/flush" or "ip route flush cache") Signed-off-by: Eric Dumazet net/ipv4/route.c | 83 +++++++++++++++++++++++++++++++-------------- 1 files changed, 59 insertions(+), 24 deletions(-)