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: <CAKohpo=6t-VHgJfrq7wz35y_zKfL+wb8amgj0ZV9cezb39r=uA@mail.gmail.com>
Date:	Tue, 17 Jun 2014 18:12:27 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Arjan van de Ven <arjan@...ux.intel.com>,
	Len Brown <lenb@...nel.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Eliezer Tamir <eliezer.tamir@...ux.intel.com>,
	Zhang Rui <rui.zhang@...el.com>, jacob.jun.pan@...ux.intel.com,
	Mike Galbraith <bitbucket@...ine.de>,
	Ingo Molnar <mingo@...nel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	John Stultz <john.stultz@...aro.org>,
	Andy Lutomirski <luto@...capital.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	registosites@...mail.com, "Srivatsa S. Bhat" <srivatsa@....edu>
Subject: Re: [PATCH 11/15] x86: Rewrite cyc2ns to avoid the need to disable IRQs

On 17 June 2014 17:45, Peter Zijlstra <peterz@...radead.org> wrote:
> Ah, just a freeze?

As per what he reported and his screen dumps, looks like yes a
freeze. IOW, no prints at all on terminal, even the ones issued
before reaching set_cyc2ns_scale()..

>> CPUs: Only two CPUs, sharing clock line
>
> What's specific to this particular CPU?

You meant why I mentioned this information? Nothing specific
actually, just mentioned it to make all information available that
might be useful .. Probably its not :)

> So what you can try is force a cyc2ns read before the write in
> set_cyc2ns_scale(). I think its possible that if we do not do the read,
> the write will wait for a 'free' slot indefinitely.

Hmm, I see. Thanks for your quick response.

Are you suggesting something like this ? :

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 57e5ce1..290ac03 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -249,6 +249,9 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
        if (!cpu_khz)
                goto done;

+       data = cyc2ns_read_begin();
+       cyc2ns_read_end(data);
+
        data = cyc2ns_write_begin(cpu);

        rdtscll(tsc_now);


@Mauro: Please try this once Peter confirms.

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