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:	Wed, 29 Apr 2009 09:23:02 -0400
From:	Andrew Gallatin <gallatin@...i.com>
To:	Eric Dumazet <dada1@...mosbay.com>
CC:	Ingo Molnar <mingo@...e.hu>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, rick.jones2@...com, brice@...i.com,
	Paul Mackerras <paulus@...ba.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: Re: [PATCH] sched: account system time properly

Eric Dumazet wrote:

> On mostly idle cpu, irqs were thus not accounted and top or mpstat could tell
> user/admin that cpu was 100 % idle, 0.00 % irq, 0.00 % softirq, while it was not.
> 
> Reported-by: Andrew Gallatin <gallatin@...i.com>
> Re-reported-by: Andrew Morton <akpm@...ux-foundation.org>
> Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
> Tested-by: Eric Dumazet <dada1@...mosbay.com>
> Acked-by: Martin Schwidefsky <schwidefsky@...ibm.com>
> 
> diff --git a/kernel/sched.c b/kernel/sched.c
> index b902e58..26efa47 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -4732,7 +4732,7 @@ void account_process_tick(struct task_struct *p, int user_tick)
>  
>  	if (user_tick)
>  		account_user_time(p, one_jiffy, one_jiffy_scaled);
> -	else if (p != rq->idle)
> +	else if ((p != rq->idle) || (irq_count() != HARDIRQ_OFFSET))
>  		account_system_time(p, HARDIRQ_OFFSET, one_jiffy,
>  				    one_jiffy_scaled);
>  	else
> 

I can confirm this fixes the issue for me.   Thank you, and I am
sorry if my git-bisect fumble-fingers caused too much wasted time.

Cheers,

Drew
--
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