Re: [PATCH 0/3 v2 RESEND] x86/smpboot: Cleanup logical package ID

2017-10-02 Thread Prarit Bhargava
On 09/26/2017 08:53 AM, Prarit Bhargava wrote: > Sending to wider audience. I originally sent this to only the people Andi > had cc'd. Here's an example of the panic: smpboot: Booting Node 1, Processors #1 OK smpboot: Package 1 of CPU 1 exceeds BIO

Re: linux-next: build warning after merge of the tip tree

2017-09-27 Thread Prarit Bhargava
On 09/26/2017 11:42 PM, Stephen Rothwell wrote: > Hi all, > > After merging the tip tree, today's linux-next build (x86_64 allnoconfig) > produced this warning: > > kernel/printk/printk.c:1983:12: warning: 'printk_time' defined but not used > [-Wunused-variable] > static int printk_time; >

[PATCH] printk: Fix unused printk_time compile warning when !CONFIG_PRINTK

2017-09-26 Thread Prarit Bhargava
ime declaration for !CONFIG_PRINTK. Reported-by: Petr Mladek Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner --- kernel/printk/printk.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 5e0bf2ef02f7..fe94246fa073 100644 --- a/ker

Re: [tip:core/printk] printk: Add monotonic, boottime, and realtime timestamps

2017-09-26 Thread Prarit Bhargava
On 09/26/2017 11:33 AM, Thomas Gleixner wrote: > On Tue, 26 Sep 2017, Prarit Bhargava wrote: >> On 09/26/2017 11:26 AM, Thomas Gleixner wrote: >>> On Tue, 26 Sep 2017, Prarit Bhargava wrote: >>> >>>> On 09/26/2017 04:42 AM, tip-bot for

Re: [tip:core/printk] printk: Add monotonic, boottime, and realtime timestamps

2017-09-26 Thread Prarit Bhargava
On 09/26/2017 11:26 AM, Thomas Gleixner wrote: > On Tue, 26 Sep 2017, Prarit Bhargava wrote: > >> On 09/26/2017 04:42 AM, tip-bot for Prarit Bhargava wrote: >>> Commit-ID: 310b454a8653ea60d3eb21ce5ab03a282a32fbe1 >>> Gitweb:

Re: [tip:core/printk] printk: Add monotonic, boottime, and realtime timestamps

2017-09-26 Thread Prarit Bhargava
On 09/26/2017 04:42 AM, tip-bot for Prarit Bhargava wrote: > Commit-ID: 310b454a8653ea60d3eb21ce5ab03a282a32fbe1 > Gitweb: http://git.kernel.org/tip/310b454a8653ea60d3eb21ce5ab03a282a32fbe1 > Author: Prarit Bhargava > AuthorDate: Mon, 18 Sep 2017 13:51:00 -0400 > Com

Re: [PATCH 3/3 v12] printk: Add monotonic, boottime, and realtime timestamps

2017-09-26 Thread Prarit Bhargava
On 09/26/2017 07:48 AM, Petr Mladek wrote: > On Mon 2017-09-18 13:51:00, Prarit Bhargava wrote: >> printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock >> timestamp to printk messages. The local hardware clock loses time each >> day making it difficult

[PATCH 0/3 v2 RESEND] x86/smpboot: Cleanup logical package ID

2017-09-26 Thread Prarit Bhargava
ting the maximum logical package ID after all the CPUs have been enumerated. Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Peter Zijlstra Cc: Andi Kleen Cc: Dave Hansen Cc: Piotr Luc Cc: Kan Liang Cc: Borislav Pe

[PATCH 2/3 v2 RESEND] x86/topology: Avoid wasting 128k for package id array

2017-09-26 Thread Prarit Bhargava
stra Cc: Andi Kleen Cc: Dave Hansen Cc: Piotr Luc Cc: Kan Liang Cc: Borislav Petkov Cc: Stephane Eranian Cc: Prarit Bhargava Cc: Arvind Yadav Cc: Andy Lutomirski Cc: Christian Borntraeger Cc: "Kirill A. Shutemov" Cc: Tom Lendacky Cc: He Chen Cc: Mathias Krause Cc: Tim Chen C

[PATCH 3/3 v2 RESEND] x86/smpboot: Fix __max_logical_packages estimate

2017-09-26 Thread Prarit Bhargava
ff-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Peter Zijlstra Cc: Andi Kleen Cc: Dave Hansen Cc: Piotr Luc Cc: Kan Liang Cc: Borislav Petkov Cc: Stephane Eranian Cc: Arvind Yadav Cc: Andy Lutomirski Cc: Christian

[PATCH 1/3 v2 RESEND] perf/x86/intel/uncore: Cache logical pkg id in uncore driver

2017-09-26 Thread Prarit Bhargava
: "H. Peter Anvin" Cc: x...@kernel.org Cc: Peter Zijlstra Cc: Andi Kleen Cc: Dave Hansen Cc: Piotr Luc Cc: Kan Liang Cc: Borislav Petkov Cc: Stephane Eranian Cc: Prarit Bhargava Cc: Arvind Yadav Cc: Andy Lutomirski Cc: Christian Borntraeger Cc: "Kirill A. Shutemov"

[tip:core/printk] printk: Add monotonic, boottime, and realtime timestamps

2017-09-25 Thread tip-bot for Prarit Bhargava
Commit-ID: a4c1a0002f4518363da9d9ecd7b805af152dcdf1 Gitweb: http://git.kernel.org/tip/a4c1a0002f4518363da9d9ecd7b805af152dcdf1 Author: Prarit Bhargava AuthorDate: Mon, 28 Aug 2017 08:21:54 -0400 Committer: Thomas Gleixner CommitDate: Mon, 25 Sep 2017 21:12:06 +0200 printk: Add

[tip:core/printk] timekeeping: Make fast accessors return 0 before timekeeping is initialized

2017-09-25 Thread tip-bot for Prarit Bhargava
Commit-ID: 5df32107f609c1f621bcdac0a685c23677ef671e Gitweb: http://git.kernel.org/tip/5df32107f609c1f621bcdac0a685c23677ef671e Author: Prarit Bhargava AuthorDate: Mon, 28 Aug 2017 08:21:53 -0400 Committer: Thomas Gleixner CommitDate: Mon, 25 Sep 2017 21:05:59 +0200 timekeeping: Make

Re: [tip:timers/core] kselftests: timers: set-timer-lat: Tweak reporting when timer fires early

2017-09-20 Thread Prarit Bhargava
o fixes the test exiting with >>> error code 0 if this was the only test failure. >>> >>> Cc: Thomas Gleixner >>> Cc: Ingo Molnar >>> Cc: Miroslav Lichvar >>> Cc: Richard Cochran >>> Cc: Prarit Bhargava >>> Cc: Stephen Boyd >

Re: [PATCH 3/3 v11] printk: Add monotonic, boottime, and realtime timestamps

2017-09-19 Thread Prarit Bhargava
On 09/17/2017 06:46 AM, Sergey Senozhatsky wrote: > I'm a bit uncomfortable with the "breaks user space" part. since this > is a strictly debugging option, would it be sufficient to store those > extended timestamps as prefixes of every message? > see (sorry for "self-quoting"): > lkml.ker

[PATCH 0/3 v12] printk: Add new timestamps

2017-09-18 Thread Prarit Bhargava
: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: "Paul E. McKenney" Cc: Christoffer Dall Cc: Deepa Dinamani Cc: Ingo

[PATCH 3/3 v12] printk: Add monotonic, boottime, and realtime timestamps

2017-09-18 Thread Prarit Bhargava
#x27;s real time patch v12: Reword Kconfig names. Simplify timestamp logic and remove recursive code. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: A

[PATCH 1/3 v12] time: Make fast functions return 0 before timekeeping is initialized

2017-09-18 Thread Prarit Bhargava
timekeeping is initialized. [v12]: Remove typecast. Signed-off-by: Prarit Bhargava Suggested-by: Peter Zijlstra Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd --- kernel/time/timekeeping.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git

[PATCH 2/3 v12] timekeeping: Provide NMI safe access to clock realtime

2017-09-18 Thread Prarit Bhargava
From: Thomas Gleixner The configurable printk timestamping wants access to clock realtime. Right now there is no ktime_get_real_fast_ns() accessor because reading the monotonic base and the realtime offset cannot be done atomically. Contrary to boot time this offset can change during runtime and

Re: [PATCH 3/3 v11] printk: Add monotonic, boottime, and realtime timestamps

2017-09-15 Thread Prarit Bhargava
On 09/15/2017 09:28 AM, Petr Mladek wrote: > > I am still slightly nervous that external tools would need updating. > Also they might have troubles to interpret the time stamps especially > when the source is changed at runtime via > /sys/module/printk/parameters/time. In earlier versions I had

Re: [PATCH 1/3 v11] time: Make fast functions return 0 before timekeeping is initialized

2017-09-15 Thread Prarit Bhargava
On 09/05/2017 08:15 AM, Thomas Gleixner wrote: > On Tue, 5 Sep 2017, Prarit Bhargava wrote: >> +static struct tk_fast tk_fast_mono cacheline_aligned = { >> +.base = { >> +(struct tk_read_base){ >> +

[PATCH 1/3 v2] perf/x86/intel/uncore: Cache logical pkg id in uncore driver

2017-09-14 Thread Prarit Bhargava
From: Andi Kleen The SNB-EP uncore driver is the only user of topology_phys_to_logical_pkg in a performance critical path. Change it query the logical pkg ID only once at initialization time and then cache it in box structure. Signed-off-by: Andi Kleen --- arch/x86/events/intel/uncore.c

[PATCH 3/3 v2] x86/smpboot: Fix __max_logical_packages estimate

2017-09-14 Thread Prarit Bhargava
ff-by: Prarit Bhargava --- arch/x86/kernel/smpboot.c | 57 +-- 1 file changed, 10 insertions(+), 47 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index a6e9bd971b91..1b86ba57ab1a 100644 --- a/arch/x86/kernel/smpboot.c

[PATCH 2/3 v2] x86/topology: Avoid wasting 128k for package id array

2017-09-14 Thread Prarit Bhargava
From: Andi Kleen I was looking at large early boot allocations and noticed that since (1f12e32f x86/topology: Create logical package id) every 64bit system allocates a 128k array to convert logical package ids. This happens because the array is sized for MAX_LOCAL_APIC and that is always 32k on

[PATCH 0/3 v2] x86/smpboot: Cleanup logical package ID

2017-09-14 Thread Prarit Bhargava
Cleanup the logical package ID code by storing the logical package ID in the cpuinfo_x86 struct and calculating the maximum logical package ID after all the CPUs have been enumerated. [v2]: Decrease logical_packages when the last thread in a socket is removed. Signed-off-by: Prarit Bhargava

Re: [x86/topology] 05aa90edc7: kernel_BUG_at_arch/x86/kernel/cpu/common.c

2017-09-14 Thread Prarit Bhargava
On 09/11/2017 07:46 PM, kernel test robot wrote: > FYI, we noticed the following commit: > > commit: 05aa90edc7910ec3d1ed791fa77371b3acb9bf08 ("x86/topology: Avoid > wasting 128k for package id array") > url: > https://github.com/0day-ci/linux/commits/Andi-Kleen/perf-x86-intel-uncore-Cache-log

Re: [x86/topology] 05aa90edc7: kernel_BUG_at_arch/x86/kernel/cpu/common.c

2017-09-13 Thread Prarit Bhargava
On 09/11/2017 07:46 PM, kernel test robot wrote: > FYI, we noticed the following commit: > > commit: 05aa90edc7910ec3d1ed791fa77371b3acb9bf08 ("x86/topology: Avoid > wasting 128k for package id array") > url: > https://github.com/0day-ci/linux/commits/Andi-Kleen/perf-x86-intel-uncore-Cache-log

[PATCH 2/3] x86/topology: Avoid wasting 128k for package id array

2017-09-08 Thread Prarit Bhargava
From: Andi Kleen I was looking at large early boot allocations and noticed that since (1f12e32f x86/topology: Create logical package id) every 64bit system allocates a 128k array to convert logical package ids. This happens because the array is sized for MAX_LOCAL_APIC and that is always 32k on

[PATCH 0/3] x86/smpboot: Cleanup logical package ID

2017-09-08 Thread Prarit Bhargava
-by: Prarit Bhargava Andi Kleen (2): perf/x86/intel/uncore: Cache logical pkg id in uncore driver x86/topology: Avoid wasting 128k for package id array Prarit Bhargava (1): x86/smpboot: Fix __max_logical_packages estimate arch/x86/events/intel/uncore.c | 1 + arch/x86/events/in

[PATCH 1/3] perf/x86/intel/uncore: Cache logical pkg id in uncore driver

2017-09-08 Thread Prarit Bhargava
From: Andi Kleen The SNB-EP uncore driver is the only user of topology_phys_to_logical_pkg in a performance critical path. Change it query the logical pkg ID only once at initialization time and then cache it in box structure. Signed-off-by: Andi Kleen --- arch/x86/events/intel/uncore.c

[PATCH 3/3] x86/smpboot: Fix __max_logical_packages estimate

2017-09-08 Thread Prarit Bhargava
ff-by: Prarit Bhargava --- arch/x86/kernel/smpboot.c | 57 +-- 1 file changed, 10 insertions(+), 47 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index ab588ff56650..51581a38543a 100644 --- a/arch/x86/kernel/smpboot.c

Re: [PATCH] x86/smpboot: Fix __max_logical_packages estimate

2017-09-07 Thread Prarit Bhargava
On 09/06/2017 02:36 PM, Prarit Bhargava wrote: > A system booted with a small number of cores enabled per package > panics because the estimate of __max_logical_packages is too low. > This occurs when the total number of active cores across all packages > is less than the maximum co

Re: [PATCH 2/2] x86/topology: Avoid wasting 128k for package id array

2017-09-07 Thread Prarit Bhargava
On 09/06/2017 07:17 PM, Andi Kleen wrote: > From: Andi Kleen > > I was looking at large early boot allocations and noticed that > since (1f12e32f x86/topology: Create logical package id) > every 64bit system allocates a 128k array to convert logical > package ids. > > This happens because the

[PATCH] x86/smpboot: Fix __max_logical_packages estimate

2017-09-06 Thread Prarit Bhargava
__max_logical_packages is still insufficient during boot use the largest possible value of Package ID. Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Jean Delvare Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Tim Chen

[PATCH 1/3 v11] time: Make fast functions return 0 before timekeeping is initialized

2017-09-05 Thread Prarit Bhargava
timekeeping is initialized. Signed-off-by: Prarit Bhargava Suggested-by: Peter Zijlstra Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd --- kernel/time/timekeeping.c | 47 +-- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/kernel

[PATCH 3/3 v11] printk: Add monotonic, boottime, and realtime timestamps

2017-09-05 Thread Prarit Bhargava
and printk_get_first_ts() portions. Rename param functions. Adjust configs, enum, and timestamp_sources_str to be 0-4. Add mention realtime clock is UTC in Documentation. v9: Fix typo. Add __ktime_get_real_fast_ns_unsafe(). v10: Remove time parameter restrictions. Signed-off-by: Prarit Bha

[PATCH 0/3 v11] printk: Add new timestamps

2017-09-05 Thread Prarit Bhargava
issues relate to each other in real time. Add monotonic, boottime, and real clock timestamps in addition to the existing local hardware clock timestamp. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John

[PATCH 2/3 v11] timekeeping: Provide NMI safe access to clock realtime

2017-09-05 Thread Prarit Bhargava
From: Thomas Gleixner The configurable printk timestamping wants access to clock realtime. Right now there is no ktime_get_real_fast_ns() accessor because reading the monotonic base and the realtime offset cannot be done atomically. Contrary to boot time this offset can change during runtime and

[PATCH 0/2 v10] printk: Add new timestamps

2017-08-28 Thread Prarit Bhargava
issues relate to each other in real time. Add monotonic, boottime, and real clock timestamps in addition to the existing local hardware clock timestamp. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John

[PATCH 2/2 v10] printk: Add monotonic, boottime, and realtime timestamps

2017-08-28 Thread Prarit Bhargava
_ts() portions. Rename param functions. Adjust configs, enum, and timestamp_sources_str to be 0-4. Add mention realtime clock is UTC in Documentation. v9: Fix typo. Add __ktime_get_real_fast_ns_unsafe(). v10: Remove time parameter restrictions. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn

[PATCH 1/2 v10] time: Make fast functions return 0 before timekeeping is initialized

2017-08-28 Thread Prarit Bhargava
timekeeping is initialized. Signed-off-by: Prarit Bhargava Suggested-by: Peter Zijlstra Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd --- kernel/time/timekeeping.c | 47 +-- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/kernel

[PATCH 0/2 v9] printk: Add new timestamps

2017-08-25 Thread Prarit Bhargava
issues relate to each other in real time. Add monotonic, boottime, and real clock timestamps in addition to the existing local hardware clock timestamp. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John

[PATCH 2/2 v9] printk: Add monotonic, boottime, and realtime timestamps

2017-08-25 Thread Prarit Bhargava
_ts() portions. Rename param functions. Adjust configs, enum, and timestamp_sources_str to be 0-4. Add mention realtime clock is UTC in Documentation. v9: Fix typo. Add __ktime_get_real_fast_ns_unsafe(). Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc:

[PATCH 1/2 v9] time: Make fast functions return 0 before timekeeping is initialized

2017-08-25 Thread Prarit Bhargava
timekeeping is initialized. Signed-off-by: Prarit Bhargava Suggested-by: Peter Zijlstra Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd --- kernel/time/timekeeping.c | 47 +-- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/kernel

Re: [PATCH 2/2 v8] printk: Add monotonic, boottime, and realtime timestamps

2017-08-25 Thread Prarit Bhargava
On 08/24/2017 02:50 PM, John Stultz wrote: > On Thu, Aug 24, 2017 at 6:42 AM, Prarit Bhargava wrote: >> --- a/include/linux/timekeeping.h >> +++ b/include/linux/timekeeping.h >> @@ -239,6 +239,7 @@ static inline u64 ktime_get_raw_ns(void) >> extern u64 ktime_get_mon

[PATCH 0/2 v8] printk: Add new timestamps

2017-08-24 Thread Prarit Bhargava
issues relate to each other in real time. Add monotonic, boottime, and real clock timestamps in addition to the existing local hardware clock timestamp. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John

[PATCH 2/2 v8] printk: Add monotonic, boottime, and realtime timestamps

2017-08-24 Thread Prarit Bhargava
name param functions. Adjust configs, enum, and timestamp_sources_str to be 0-4. Add mention realtime clock is UTC in Documentation. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Stultz Cc: Thomas Gleixner Cc:

[PATCH 1/2 v8] time: Make fast functions return 0 before timekeeping is initialized

2017-08-24 Thread Prarit Bhargava
timekeeping is initialized. Signed-off-by: Prarit Bhargava Suggested-by: Peter Zijlstra Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd --- kernel/time/timekeeping.c | 47 +-- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/kernel

Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime timestamps

2017-08-23 Thread Prarit Bhargava
On 08/23/2017 04:45 AM, Petr Mladek wrote: > On Thu 2017-08-17 09:15:39, Prarit Bhargava wrote: >> printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock >> timestamp to printk messages. The local hardware clock loses time each >> day making it difficult

Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime timestamps

2017-08-22 Thread Prarit Bhargava
On 08/22/2017 10:23 AM, Petr Mladek wrote: > On Tue 2017-08-22 10:09:40, Prarit Bhargava wrote: >> >> >> On 08/17/2017 11:30 AM, Mark Salyzyn wrote: >>> On 08/17/2017 06:15 AM, Prarit Bhargava wrote: >>>> printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodif

Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime timestamps

2017-08-22 Thread Prarit Bhargava
On 08/17/2017 11:30 AM, Mark Salyzyn wrote: > On 08/17/2017 06:15 AM, Prarit Bhargava wrote: >> printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock >> timestamp to printk messages. The local hardware clock loses time each >> day making it difficult

[PATCH 0/2 v7] printk: Add new timestamps

2017-08-17 Thread Prarit Bhargava
issues relate to each other in real time. Add monotonic, boottime, and real clock timestamps in addition to the existing local hardware clock timestamp. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John

[PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime timestamps

2017-08-17 Thread Prarit Bhargava
' Kconfig to avoid defconfig churn. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: "Paul E. McKenney

[PATCH 1/2 v7] time: Make fast functions return 0 before timekeeping is initialized

2017-08-17 Thread Prarit Bhargava
timekeeping is initialized. Signed-off-by: Prarit Bhargava Suggested-by: Peter Zijlstra Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd --- kernel/time/timekeeping.c | 47 +-- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/kernel

[PATCH 1/2 v6] time: Make fast functions return 0 before timekeeping is initialized

2017-08-16 Thread Prarit Bhargava
timekeeping is initialized. v6: Separate these changes out into their own patch. Signed-off-by: Prarit Bhargava Suggested-by: Peter Zijlstra Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd --- kernel/time/timekeeping.c | 47 +-- 1 file changed, 33

[PATCH 2/2 v6] printk: Add monotonic, boottime, and realtime timestamps

2017-08-16 Thread Prarit Bhargava
NED). v6: Define PRINTK_TIME_UNDEFINED for !CONFIG_PRINTK builds. Separate timekeeping changes into separate patch. Minor include file cleanup. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Stultz Cc: Th

[PATCH 0/2 v6] printk: Add new timestamps

2017-08-16 Thread Prarit Bhargava
issues relate to each other in real time. Add monotonic, boottime, and real clock timestamps in addition to the existing local hardware clock timestamp. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John

[PATCH v5] printk: Add monotonic, boottime, and realtime timestamps

2017-08-10 Thread Prarit Bhargava
r Dall Cc: Deepa Dinamani Cc: Ingo Molnar Cc: Joel Fernandes Cc: Prarit Bhargava Cc: Kees Cook Cc: Peter Zijlstra Cc: Geert Uytterhoeven Cc: "Luis R. Rodriguez" Cc: Nicholas Piggin Cc: "Jason A. Donenfeld" Cc: Olof Johansson Cc: Josh Poimboeuf Cc: linux-...@vger

Re: [PATCH v3] printk: Add boottime and real timestamps

2017-08-09 Thread Prarit Bhargava
On 08/09/2017 02:24 PM, Luis R. Rodriguez wrote: > On Mon, Aug 07, 2017 at 02:17:33PM -0400, Prarit Bhargava wrote: >> >> >> On 08/07/2017 01:14 PM, Luis R. Rodriguez wrote: >> >>> >>> Note printk_late_init() is a late_initcall(). This means if the

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-08 Thread Prarit Bhargava
On 08/08/2017 04:28 AM, Peter Zijlstra wrote: > On Mon, Aug 07, 2017 at 01:36:39PM -0700, Paul E. McKenney wrote: >> On Mon, Aug 07, 2017 at 04:06:09PM -0400, Prarit Bhargava wrote: > >>> peterz? Want to offer a suggestion? The issue is that I'm changing a bool >&

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-08 Thread Prarit Bhargava
On 08/07/2017 08:19 PM, Sergey Senozhatsky wrote: > On (08/07/17 11:52), Prarit Bhargava wrote: > [..] >> +if (strlen(param) == 1) { >> +/* Preserve legacy boolean settings */ >> +if (!strcmp("0", param) || !strcmp("n&quo

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-08 Thread Prarit Bhargava
On 08/07/2017 08:19 PM, Sergey Senozhatsky wrote: > On (08/07/17 11:52), Prarit Bhargava wrote: > [..] >> +/** >> + * enum printk_time_type - Timestamp types for printk() messages. >> + * @PRINTK_TIME_DISABLE: No time stamp. >> + * @PRINTK_TIME_LOCAL:

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Prarit Bhargava
On 08/07/2017 02:47 PM, John Stultz wrote: > On Mon, Aug 7, 2017 at 11:04 AM, Prarit Bhargava wrote: >> On 08/07/2017 12:52 PM, John Stultz wrote: >>> Still not quite following why you're updating all the defconfigs. I'd >>> make sure the Kconfig default s

Re: [PATCH v3] printk: Add boottime and real timestamps

2017-08-07 Thread Prarit Bhargava
On 08/07/2017 01:14 PM, Luis R. Rodriguez wrote: > > Note printk_late_init() is a late_initcall(). This means if the > printk_time_setting was disabled it will take a while to enable it. Enabling > it > is done at the device_initcall(), so if printk setting is disabled but a user > enables it

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Prarit Bhargava
On 08/07/2017 12:58 PM, Mark Salyzyn wrote: > On 08/07/2017 08:52 AM, Prarit Bhargava wrote: >> diff --git a/arch/arm/configs/aspeed_g4_defconfig >> b/arch/arm/configs/aspeed_g4_defconfig >> index cfc2465e8b77..5f3c50914e92 100644 >> --- a/arch/arm/configs/aspeed_g4_

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Prarit Bhargava
On 08/07/2017 12:52 PM, John Stultz wrote: > On Mon, Aug 7, 2017 at 8:52 AM, Prarit Bhargava wrote: >> printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock >> timestamp to printk messages. The local hardware clock loses time each >> day making it d

[PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-07 Thread Prarit Bhargava
IME clock functionality. v4: Fix messages, add additional printk.time options, and fix configs. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Andrew Morton Cc: G

Re: [PATCH v3] printk: Add boottime and real timestamps

2017-08-07 Thread Prarit Bhargava
On 08/04/2017 11:36 AM, Mark Salyzyn wrote: > On 08/03/2017 06:18 PM, Prarit Bhargava wrote: > >> diff --git a/arch/arm/configs/aspeed_g4_defconfig >> b/arch/arm/configs/aspeed_g4_defconfig >> index cfc2465e8b77..6c73c305ad17 100644 >> --- a/arch/arm/configs/asp

[PATCH v3] printk: Add boottime and real timestamps

2017-08-03 Thread Prarit Bhargava
lock functionality. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: "Paul E. McKenney" Cc: Christoffer

Re: [PATCH v2] printk: Add boottime and real timestamps

2017-08-01 Thread Prarit Bhargava
On 08/01/2017 12:29 PM, Luis R. Rodriguez wrote: Thanks for the previous comments re: enum & kdoc'ifying. I will apply them to v3. > > And since you are kdoc'ifying consider later adding proper rst format docs > for printk and then pegging this kdoc entry into it. Unfortunately I only > se

Re: [PATCH v2] printk: Add boottime and real timestamps

2017-08-01 Thread Prarit Bhargava
On 08/01/2017 01:00 PM, John Stultz wrote: > On Tue, Aug 1, 2017 at 5:55 AM, Prarit Bhargava wrote: >> printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock >> timestamp to printk messages. The local hardware clock loses time each >> day making it d

[PATCH v2] printk: Add boottime and real timestamps

2017-08-01 Thread Prarit Bhargava
k in the call to ktime_get_log_ts() in printk_get_ts(). v2: Use peterz's suggested Kconfig options. Merge patchset together. Fix i386 !CONFIG_PRINTK builds. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt

Re: [PATCH 1/2] printk: Make CONFIG_PRINTK_TIME an int

2017-07-31 Thread Prarit Bhargava
On 07/25/2017 08:55 AM, Luis R. Rodriguez wrote: > On Tue, Jul 25, 2017 at 08:17:26AM -0400, Prarit Bhargava wrote: >> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c >> index fc47863f629c..26cf6cadd267 100644 >> --- a/kernel/printk/printk.c >> +

Re: [PATCH 2/2] printk: Add boottime and real timestamps

2017-07-28 Thread Prarit Bhargava
On 07/25/2017 09:00 AM, Peter Zijlstra wrote: > On Tue, Jul 25, 2017 at 08:17:27AM -0400, Prarit Bhargava wrote: >> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug >> index 5b1662ec546f..6cd38a25f8ea 100644 >> --- a/lib/Kconfig.debug >> +++ b/lib/Kconfig.debug

Re: [PATCH] turbostat: Running on virtual machine is not supported

2017-07-28 Thread Prarit Bhargava
schuh > wrote: >> On Tue, 25 Jul 2017, Prarit Bhargava wrote: >>> A common way of determining if the system is a virtual machine is to >>> search /proc/cpuinfo flags entry for "hypervisor". turbostat must output >>> a proper error message when found. &g

Re: [PATCH] turbostat: Running on virtual machine is not supported

2017-07-27 Thread Prarit Bhargava
On 07/26/2017 11:09 PM, Len Brown wrote: > Henrique, > > I like your suggestion, thanks! > > BTW. let's discuss (and patch) turbostat on linux-pm, rather than on lkml. Sure -- Len, can you add an entry to RHMAINTAINERS for that? I use the get_maintainer.pl script to apply all cc's. P.

[PATCH] turbostat: Running on virtual machine is not supported

2017-07-25 Thread Prarit Bhargava
if the system is a virtual machine is to search /proc/cpuinfo flags entry for "hypervisor". turbostat must output a proper error message when found. Signed-off-by: Prarit Bhargava Cc: Len Brown Cc: Len Brown --- tools/power/x86/turbostat/turbostat.c | 34 +++

[PATCH 1/7] turbostat: set max_num_cpus equal to the cpumask length

2017-07-25 Thread Prarit Bhargava
. Set max_num_cpus to the length of a cpumask. Signed-off-by: Prarit Bhargava Cc: Len Brown --- tools/power/x86/turbostat/turbostat.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat

[PATCH 4/7] turbostat: track thread ID in cpu_topology

2017-07-25 Thread Prarit Bhargava
The code can be simplified if the cpu_topology *cpus tracks the thread IDs. This removes an additional file lookup and simplifies the counter initialization code. Add thread ID to cpu_topology information and cleanup the counter initialization code. Signed-off-by: Prarit Bhargava Cc: Len Brown

[PATCH 0/7 RESEND] turbostat: Fix AMD output by making turbostat aware of nodes

2017-07-25 Thread Prarit Bhargava
cannot handle this configuration, and as a result only shows 1/2 the cores in its output. This patchset makes turbostate aware of nodes. It has been tested on various AMD and Intel systems and no issues have been found. Signed-off-by: Prarit Bhargava Cc: Len Brown Prarit Bhargava (7

[PATCH 5/7] turbostat: rename num_cores_per_pkg to num_cores_per_node

2017-07-25 Thread Prarit Bhargava
turbostat incorrectly assumes that there is one node per package. As a result num_cores_per_pkg is not correctly named and is actually num_cores_per_node. Rename num_cores_per_pkg to num_cores_per_node. Signed-off-by: Prarit Bhargava Cc: Len Brown --- tools/power/x86/turbostat/turbostat.c

[PATCH 7/7] turbostat: add node information into turbostat calculations

2017-07-25 Thread Prarit Bhargava
The previous patches have added node information to turbostat, but the counters code does not take it into account. Add node information from cpu_topology calculations to turbostat counters. Signed-off-by: Prarit Bhargava Cc: Len Brown --- tools/power/x86/turbostat/turbostat.c | 143

[PATCH 2/7] turbostat: Fix node and siblings lookup data

2017-07-25 Thread Prarit Bhargava
ssing Unit/Thread IDs information to each cpu_topology struct. Confirm that the thread is on the same core as indicated by thread_siblings_list. Signed-off-by: Prarit Bhargava Cc: Len Brown --- tools/power/x86/turbostat/turbostat.c | 112 +++--- 1 file change

[PATCH 3/7] turbostat: Calculate additional node information for a package

2017-07-25 Thread Prarit Bhargava
er to properly enumerate the cores we need to track both the physical and logical node IDs. Add physical_node_id to track the node ID assigned by the kernel, and logical_node_id used by turbostat to track the nodes per package ie) a 0-based count within the package. Signed-off-by: Prarit Bhargava Cc

[PATCH 6/7] turbostat: remove num_ from cpu_topology struct

2017-07-25 Thread Prarit Bhargava
Cleanup, remove num_ from num_nodes_per_pkg, num_cores_per_node, and num_threads_per_node. Signed-off-by: Prarit Bhargava Cc: Len Brown --- tools/power/x86/turbostat/turbostat.c | 46 +-- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/tools

[PATCH 2/2] printk: Add boottime and real timestamps

2017-07-25 Thread Prarit Bhargava
the protection of a sequence lock in the call to ktime_get_log_ts() in printk_get_ts(). Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Andrew Morton Cc:

[PATCH 1/2] printk: Make CONFIG_PRINTK_TIME an int

2017-07-25 Thread Prarit Bhargava
CONFIG_PRINTK_TIME is a bool and in order to add timestamp options for the monotonic and real time clock it must be expanded to an int. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Stultz Cc: Thomas

[PATCH 0/2] printk: allow different timestamps for printk.time

2017-07-25 Thread Prarit Bhargava
otection of a sequence lock in the call to ktime_get_log_ts() in printk_get_ts(). Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Andrew Morton Cc: Greg Kroa

Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg)

2017-07-19 Thread Prarit Bhargava
On 07/19/2017 08:28 AM, Thomas Gleixner wrote: > On Wed, 19 Jul 2017, Prarit Bhargava wrote: >> On 07/19/2017 03:23 AM, Thomas Gleixner wrote: >>> There is another option to remedy this and the dmesg tooling issues: >>> >>> Instead of switching the time sta

Re: [PATCH 0/7] turbostat, Fix AMD output by making turbostat aware of nodes

2017-07-19 Thread Prarit Bhargava
Forgot to cc Len at his kernel.org address ... P. On 07/16/2017 04:49 PM, Prarit Bhargava wrote: > AMD family processors do not show all cores in the output of turbostat. This > occurs because AMD has multiple nodes per socket and enumerates cores > within each node from 0. For exampl

Re: [PATCH v2 1/4] time: rtc-lib: Add rtc_show_time(const char *prefix_msg)

2017-07-19 Thread Prarit Bhargava
On 07/19/2017 03:23 AM, Thomas Gleixner wrote: > On Tue, 18 Jul 2017, Mark Salyzyn wrote: >> On 07/18/2017 03:35 PM, Thomas Gleixner wrote: >>> There was some discussion about making the clock source for dmesg time >>> stamps selectable, so you can use MONOTONIC, REALTIME, BOOTTIME. The >>> patch

[PATCH 0/7] turbostat, Fix AMD output by making turbostat aware of nodes

2017-07-16 Thread Prarit Bhargava
cannot handle this configuration, and as a result only shows 1/2 the cores in its output. This patchset makes turbostate aware of nodes. It has been tested on various AMD and Intel systems and no issues have been found. Signed-off-by: Prarit Bhargava Cc: Len Brown Prarit Bhargava (7

[PATCH 1/7] turbostat: set max_num_cpus equal to the cpumask length

2017-07-16 Thread Prarit Bhargava
. Set max_num_cpus to the length of a cpumask. Signed-off-by: Prarit Bhargava Cc: Len Brown --- tools/power/x86/turbostat/turbostat.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat

[PATCH 4/7] turbostat: track thread ID in cpu_topology

2017-07-16 Thread Prarit Bhargava
The code can be simplified if the cpu_topology *cpus tracks the thread IDs. This removes an additional file lookup and simplifies the counter initialization code. Add thread ID to cpu_topology information and cleanup the counter initialization code. Signed-off-by: Prarit Bhargava Cc: Len Brown

[PATCH 2/7] turbostat: Fix node and siblings lookup data

2017-07-16 Thread Prarit Bhargava
ssing Unit/Thread IDs information to each cpu_topology struct. Confirm that the thread is on the same core as indicated by thread_siblings_list. Signed-off-by: Prarit Bhargava Cc: Len Brown --- tools/power/x86/turbostat/turbostat.c | 112 +++--- 1 file change

[PATCH 3/7] turbostat: Calculate additional node information for a package

2017-07-16 Thread Prarit Bhargava
er to properly enumerate the cores we need to track both the physical and logical node IDs. Add physical_node_id to track the node ID assigned by the kernel, and logical_node_id used by turbostat to track the nodes per package ie) a 0-based count within the package. Signed-off-by: Prarit Bhargava Cc

[PATCH 5/7] turbostat: rename num_cores_per_pkg to num_cores_per_node

2017-07-16 Thread Prarit Bhargava
turbostat incorrectly assumes that there is one node per package. As a result num_cores_per_pkg is not correctly named and is actually num_cores_per_node. Rename num_cores_per_pkg to num_cores_per_node. Signed-off-by: Prarit Bhargava Cc: Len Brown --- tools/power/x86/turbostat/turbostat.c

[PATCH 7/7] turbostat: add node information into turbostat calculations

2017-07-16 Thread Prarit Bhargava
The previous patches have added node information to turbostat, but the counters code does not take it into account. Add node information from cpu_topology calculations to turbostat counters. Signed-off-by: Prarit Bhargava Cc: Len Brown --- tools/power/x86/turbostat/turbostat.c | 143

[PATCH 6/7] turbostat: remove num_ from cpu_topology struct

2017-07-16 Thread Prarit Bhargava
Cleanup, remove num_ from num_nodes_per_pkg, num_cores_per_node, and num_threads_per_node. Signed-off-by: Prarit Bhargava Cc: Len Brown --- tools/power/x86/turbostat/turbostat.c | 46 +-- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/tools

Re: [PATCH V2] kernel/watchdog: fix spurious hard lockups

2017-06-21 Thread Prarit Bhargava
On 06/21/2017 11:47 AM, Liang, Kan wrote: > > >> On Wed, 21 Jun 2017, kan.li...@intel.com wrote: >>> >>> #ifdef CONFIG_HARDLOCKUP_DETECTOR >>> +/* >>> + * The NMI watchdog relies on PERF_COUNT_HW_CPU_CYCLES event, >> which >>> + * can tick faster than the measured CPU Frequency due to Turbo mo

<    1   2   3   4   5   6   7   8   9   10   >