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] [day] [month] [year] [list]
Message-ID: <2f11576a0904301845m7ae6d501u989810857b96e74b@mail.gmail.com>
Date:	Fri, 1 May 2009 10:45:52 +0900
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, bharata@...ux.vnet.ibm.com,
	balajirrao@...il.com, dhaval@...ux.vnet.ibm.com,
	kamezawa.hiroyu@...fujitsu.com, a.p.zijlstra@...llo.nl,
	balbir@...ux.vnet.ibm.com, mingo@...e.hu, schwidefsky@...ibm.com
Subject: Re: [PATCH v2] cpuacct: VIRT_CPU_ACCOUNTING don't prevent percpu 
	cputime count

>> For archs which define VIRT_CPU_ACCOUNTING, every tick would result
>> in >1000 units of cputime updates and since this is much much greater
>> than percpu_batch_counter, we end up taking spinlock on every tick.
>>
>> This patch change batch rule. now, any cpu can store "percpu_counter_bach * jiffies"
>> cputime in per-cpu cache.
>> it mean this patch don't have behavior change if VIRT_CPU_ACCOUNTING=n.
>
> Does this actually matter?
>
> If we're calling cpuacct_update_stats() with large values of `cputime'
> then presumably we're also calling cpuacct_update_stats() at a low
> frequency, so the common lock-taking won't cause performance problems?

VIRT_CPU_ACCOUNTING change cputime_t meaning. but don't change calling
update time frequency.

example,
ia64, HZ=1000, VIRT_CPU_ACCOUNTING=y (1 cputime == 1ns, ie 1 jiffies
== 1000000 cputime)

every tick updating makes 1000000 cputime. (see jiffies_to_cputime)

-----------------------------------------------------------------------------------------
void account_process_tick(struct task_struct *p, int user_tick)
{
        cputime_t one_jiffy = jiffies_to_cputime(1);
        cputime_t one_jiffy_scaled = cputime_to_scaled(one_jiffy);
        struct rq *rq = this_rq();

        if (user_tick)
                account_user_time(p, one_jiffy, one_jiffy_scaled);
        else if (p != rq->idle)
                account_system_time(p, HARDIRQ_OFFSET, one_jiffy,
                                    one_jiffy_scaled);
        else
                account_idle_time(one_jiffy);
}
-----------------------------------------------------------------------------------------

but tick updating frequency don't changed.
--
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