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: <20080914151404.GA28850@elte.hu>
Date:	Sun, 14 Sep 2008 17:14:04 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Frank Mayhar <fmayhar@...gle.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Roland McGrath <roland@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2.6.27-rc5 resubmit] Fix itimer/many thread hang.


* Frank Mayhar <fmayhar@...gle.com> wrote:

> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h

> +/**
> + * thread_group_cputime_account_user - Maintain utime for a thread group.
> + *
> + * @tgtimes:	Pointer to thread_group_cputime structure.
> + * @cputime:	Time value by which to increment the utime field of that
> + *		structure.
> + *
> + * If thread group time is being maintained, get the structure for the
> + * running CPU and update the utime field there.
> + */
> +static inline void thread_group_cputime_account_user(
> +	struct thread_group_cputime *tgtimes,
> +	cputime_t cputime)
> +{
> +	if (tgtimes->totals) {
> +		struct task_cputime *times;
> +
> +		times = per_cpu_ptr(tgtimes->totals, get_cpu());
> +		times->utime = cputime_add(times->utime, cputime);
> +		put_cpu_no_resched();
> +	}
> +}
> +
> +/**
> + * thread_group_cputime_account_system - Maintain stime for a thread group.
> + *
> + * @tgtimes:	Pointer to thread_group_cputime structure.
> + * @cputime:	Time value by which to increment the stime field of that
> + *		structure.
> + *
> + * If thread group time is being maintained, get the structure for the
> + * running CPU and update the stime field there.
> + */
> +static inline void thread_group_cputime_account_system(
> +	struct thread_group_cputime *tgtimes,
> +	cputime_t cputime)
> +{
> +	if (tgtimes->totals) {
> +		struct task_cputime *times;
> +
> +		times = per_cpu_ptr(tgtimes->totals, get_cpu());
> +		times->stime = cputime_add(times->stime, cputime);
> +		put_cpu_no_resched();
> +	}
> +}
> +
> +/**
> + * thread_group_cputime_account_exec_runtime - Maintain exec runtime for a
> + *						thread group.
> + *
> + * @tgtimes:	Pointer to thread_group_cputime structure.
> + * @ns:		Time value by which to increment the sum_exec_runtime field
> + *		of that structure.
> + *
> + * If thread group time is being maintained, get the structure for the
> + * running CPU and update the sum_exec_runtime field there.
> + */
> +static inline void thread_group_cputime_account_exec_runtime(
> +	struct thread_group_cputime *tgtimes,
> +	unsigned long long ns)
> +{
> +	if (tgtimes->totals) {
> +		struct task_cputime *times;
> +
> +		times = per_cpu_ptr(tgtimes->totals, get_cpu());
> +		times->sum_exec_runtime += ns;
> +		put_cpu_no_resched();
> +	}
> +}

please uninline these functions.

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