Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-15 Thread Dmitry Safonov
On Thu, 2018-03-15 at 16:28 +0100, Joerg Roedel wrote: > On Thu, Mar 15, 2018 at 02:42:00PM +0000, Dmitry Safonov wrote: > > But even with loop-limit we will need ratelimit each printk() > > *also*. > > Otherwise loop-limit will be based on time spent printing, not

Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-15 Thread Dmitry Safonov
On Thu, 2018-03-15 at 16:28 +0100, Joerg Roedel wrote: > On Thu, Mar 15, 2018 at 02:42:00PM +0000, Dmitry Safonov wrote: > > But even with loop-limit we will need ratelimit each printk() > > *also*. > > Otherwise loop-limit will be based on time spent printing, not

Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-15 Thread Dmitry Safonov
On Thu, 2018-03-15 at 14:34 +, Dmitry Safonov wrote: > On Thu, 2018-03-15 at 15:22 +0100, Joerg Roedel wrote: > > On Thu, Mar 15, 2018 at 02:13:03PM +0000, Dmitry Safonov wrote: > > > So, you suggest to remove ratelimit at all? > > > Do we really need printk fl

Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-15 Thread Dmitry Safonov
On Thu, 2018-03-15 at 14:34 +, Dmitry Safonov wrote: > On Thu, 2018-03-15 at 15:22 +0100, Joerg Roedel wrote: > > On Thu, Mar 15, 2018 at 02:13:03PM +0000, Dmitry Safonov wrote: > > > So, you suggest to remove ratelimit at all? > > > Do we really need printk fl

Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-15 Thread Dmitry Safonov
On Thu, 2018-03-15 at 15:22 +0100, Joerg Roedel wrote: > On Thu, Mar 15, 2018 at 02:13:03PM +0000, Dmitry Safonov wrote: > > So, you suggest to remove ratelimit at all? > > Do we really need printk flood for each happened fault? > > Imagine, you've hundreds of mappings and

Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-15 Thread Dmitry Safonov
On Thu, 2018-03-15 at 15:22 +0100, Joerg Roedel wrote: > On Thu, Mar 15, 2018 at 02:13:03PM +0000, Dmitry Safonov wrote: > > So, you suggest to remove ratelimit at all? > > Do we really need printk flood for each happened fault? > > Imagine, you've hundreds of mappings and

Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-15 Thread Dmitry Safonov
On Thu, 2018-03-15 at 14:46 +0100, Joerg Roedel wrote: > On Thu, Feb 15, 2018 at 07:17:29PM +0000, Dmitry Safonov wrote: > > diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c > > index accf58388bdb..6c4ea32ee6a9 100644 > > --- a/drivers/iommu/dmar.c > >

Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-15 Thread Dmitry Safonov
On Thu, 2018-03-15 at 14:46 +0100, Joerg Roedel wrote: > On Thu, Feb 15, 2018 at 07:17:29PM +0000, Dmitry Safonov wrote: > > diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c > > index accf58388bdb..6c4ea32ee6a9 100644 > > --- a/drivers/iommu/dmar.c > >

Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-13 Thread Dmitry Safonov
Gentle ping? On Mon, 2018-03-05 at 15:00 +, Dmitry Safonov wrote: > Hi Joerg, > > What do you think about v3? > It looks like, I can solve my softlookups with just a bit more proper > ratelimiting.. > > On Thu, 2018-02-15 at 19:17 +, Dmitry Safonov wrote: >

Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-13 Thread Dmitry Safonov
Gentle ping? On Mon, 2018-03-05 at 15:00 +, Dmitry Safonov wrote: > Hi Joerg, > > What do you think about v3? > It looks like, I can solve my softlookups with just a bit more proper > ratelimiting.. > > On Thu, 2018-02-15 at 19:17 +, Dmitry Safonov wrote: >

Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-05 Thread Dmitry Safonov
Hi Joerg, What do you think about v3? It looks like, I can solve my softlookups with just a bit more proper ratelimiting.. On Thu, 2018-02-15 at 19:17 +, Dmitry Safonov wrote: > There is a ratelimit for printing, but it's incremented each time the > cpu recives dmar fault interrupt.

Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-03-05 Thread Dmitry Safonov
Hi Joerg, What do you think about v3? It looks like, I can solve my softlookups with just a bit more proper ratelimiting.. On Thu, 2018-02-15 at 19:17 +, Dmitry Safonov wrote: > There is a ratelimit for printing, but it's incremented each time the > cpu recives dmar fault interrupt.

Re: [PATCH RFC v2 4/6] x86: Disable PTI on compatibility mode

2018-02-16 Thread Dmitry Safonov
2018-02-16 7:11 GMT+00:00 Cyrill Gorcunov : > On Thu, Feb 15, 2018 at 11:29:42PM +, Andy Lutomirski wrote: > ... >> >>> +bool pti_handle_segment_not_present(long error_code) >> >>> +{ >> >>> + if (!static_cpu_has(X86_FEATURE_PTI)) >> >>> + return false;

Re: [PATCH RFC v2 4/6] x86: Disable PTI on compatibility mode

2018-02-16 Thread Dmitry Safonov
2018-02-16 7:11 GMT+00:00 Cyrill Gorcunov : > On Thu, Feb 15, 2018 at 11:29:42PM +, Andy Lutomirski wrote: > ... >> >>> +bool pti_handle_segment_not_present(long error_code) >> >>> +{ >> >>> + if (!static_cpu_has(X86_FEATURE_PTI)) >> >>> + return false; >> >>> + >> >>> +

Re: [PATCH RFC v2 4/6] x86: Disable PTI on compatibility mode

2018-02-16 Thread Dmitry Safonov
2018-02-15 20:02 GMT+00:00 Andy Lutomirski : > On Thu, Feb 15, 2018 at 4:36 PM, Nadav Amit wrote: >> Based on the understanding that there should be no way for userspace to >> address the kernel-space from compatibility mode, disable it while >> running in

Re: [PATCH RFC v2 4/6] x86: Disable PTI on compatibility mode

2018-02-16 Thread Dmitry Safonov
2018-02-15 20:02 GMT+00:00 Andy Lutomirski : > On Thu, Feb 15, 2018 at 4:36 PM, Nadav Amit wrote: >> Based on the understanding that there should be no way for userspace to >> address the kernel-space from compatibility mode, disable it while >> running in compatibility mode as long as the 64-bit

[PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-02-15 Thread Dmitry Safonov
..@8bytes.org> Cc: Lu Baolu <baolu...@linux.intel.com> Cc: io...@lists.linux-foundation.org Signed-off-by: Dmitry Safonov <d...@arista.com> --- Maybe it's worth to limit while(1) cycle. If IOMMU generates faults with equal speed as irq handler cleans them, it may turn into long-irq-disabl

[PATCHv3] iommu/intel: Ratelimit each dmar fault printing

2018-02-15 Thread Dmitry Safonov
cess_one_work+0x1e8/0x3a9$\n' [..] worker_thread+0x25d/0x345$\n' [..] kthread+0xea/0xf2$\n' [..] ret_from_fork+0x58/0x90$\n' Cc: Alex Williamson Cc: David Woodhouse Cc: Ingo Molnar Cc: Joerg Roedel Cc: Lu Baolu Cc: io...@lists.linux-foundation.org Signed-off-by: Dmitry Safonov --- Maybe it's w

Re: [PATCHv2 4/6] iommu/intel: Handle DMAR faults on workqueue

2018-02-15 Thread Dmitry Safonov
On Tue, 2018-02-13 at 17:38 +, Dmitry Safonov wrote: > On Tue, 2018-02-13 at 17:35 +0100, Joerg Roedel wrote: > > On Mon, Feb 12, 2018 at 04:48:23PM +0000, Dmitry Safonov wrote: > > > dmar_fault() reports/handles/cleans DMAR faults in a cycle one- > > > by- &g

Re: [PATCHv2 4/6] iommu/intel: Handle DMAR faults on workqueue

2018-02-15 Thread Dmitry Safonov
On Tue, 2018-02-13 at 17:38 +, Dmitry Safonov wrote: > On Tue, 2018-02-13 at 17:35 +0100, Joerg Roedel wrote: > > On Mon, Feb 12, 2018 at 04:48:23PM +0000, Dmitry Safonov wrote: > > > dmar_fault() reports/handles/cleans DMAR faults in a cycle one- > > > by- &g

Re: [tip:x86/boot] x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G

2018-02-13 Thread Dmitry Safonov
2018-02-13 17:17 GMT+00:00 Ingo Molnar : > > * Andrei Vagin wrote: > >> On Tue, Feb 13, 2018 at 12:02:49PM +0300, Kirill A. Shutemov wrote: >> > On Tue, Feb 13, 2018 at 12:41:22AM -0800, Andrei Vagin wrote: >> > > On Tue, Feb 13, 2018 at 11:08:16AM +0300,

Re: [tip:x86/boot] x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G

2018-02-13 Thread Dmitry Safonov
2018-02-13 17:17 GMT+00:00 Ingo Molnar : > > * Andrei Vagin wrote: > >> On Tue, Feb 13, 2018 at 12:02:49PM +0300, Kirill A. Shutemov wrote: >> > On Tue, Feb 13, 2018 at 12:41:22AM -0800, Andrei Vagin wrote: >> > > On Tue, Feb 13, 2018 at 11:08:16AM +0300, Kirill A. Shutemov wrote: >> > > > On

Re: [PATCHv2 4/6] iommu/intel: Handle DMAR faults on workqueue

2018-02-13 Thread Dmitry Safonov
On Tue, 2018-02-13 at 17:35 +0100, Joerg Roedel wrote: > On Mon, Feb 12, 2018 at 04:48:23PM +0000, Dmitry Safonov wrote: > > dmar_fault() reports/handles/cleans DMAR faults in a cycle one-by- > > one. > > The nuisance is that it's set as a irq handler and runs with > &

Re: [PATCHv2 4/6] iommu/intel: Handle DMAR faults on workqueue

2018-02-13 Thread Dmitry Safonov
On Tue, 2018-02-13 at 17:35 +0100, Joerg Roedel wrote: > On Mon, Feb 12, 2018 at 04:48:23PM +0000, Dmitry Safonov wrote: > > dmar_fault() reports/handles/cleans DMAR faults in a cycle one-by- > > one. > > The nuisance is that it's set as a irq handler and runs with > &

[PATCHv3 6/6] iommu/intel: Ratelimit each dmar fault printing

2018-02-12 Thread Dmitry Safonov
fault_work+0x15/0x17$\n' [..] process_one_work+0x1e8/0x3a9$\n' [..] worker_thread+0x25d/0x345$\n' [..] kthread+0xea/0xf2$\n' [..] ret_from_fork+0x58/0x90$\n' Signed-off-by: Dmitry Safonov <d...@arista.com> --- v3: inverse `ratelimited' drivers/iommu/dmar.c | 7 +++ 1 file changed, 3

[PATCHv3 6/6] iommu/intel: Ratelimit each dmar fault printing

2018-02-12 Thread Dmitry Safonov
fault_work+0x15/0x17$\n' [..] process_one_work+0x1e8/0x3a9$\n' [..] worker_thread+0x25d/0x345$\n' [..] kthread+0xea/0xf2$\n' [..] ret_from_fork+0x58/0x90$\n' Signed-off-by: Dmitry Safonov --- v3: inverse `ratelimited' drivers/iommu/dmar.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletion

[PATCHv2 1/6] iommu/intel: Add __init for dmar_register_bus_notifier()

2018-02-12 Thread Dmitry Safonov
It's called only from intel_iommu_init(), which is init function. Signed-off-by: Dmitry Safonov <d...@arista.com> --- drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 9a7ffd13c7f0..accf58388bdb

[PATCHv2 1/6] iommu/intel: Add __init for dmar_register_bus_notifier()

2018-02-12 Thread Dmitry Safonov
It's called only from intel_iommu_init(), which is init function. Signed-off-by: Dmitry Safonov --- drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 9a7ffd13c7f0..accf58388bdb 100644 --- a/drivers/iommu

[PATCHv2 0/6] iommu/intel: Handle DMAR faults in a wq

2018-02-12 Thread Dmitry Safonov
se <dw...@infradead.org> Cc: Ingo Molnar <mi...@kernel.org> Cc: Joerg Roedel <j...@8bytes.org> Cc: Lu Baolu <baolu...@linux.intel.com> Cc: io...@lists.linux-foundation.org Dmitry Safonov (6): iommu/intel: Add __init for dmar_register_bus_notifier() iommu/intel: Clean/document fa

[PATCHv2 0/6] iommu/intel: Handle DMAR faults in a wq

2018-02-12 Thread Dmitry Safonov
Baolu Cc: io...@lists.linux-foundation.org Dmitry Safonov (6): iommu/intel: Add __init for dmar_register_bus_notifier() iommu/intel: Clean/document fault status flags iommu/intel: Introduce clear_primary_faults() helper iommu/intel: Handle DMAR faults on workqueue iommu/intel: Rename

[PATCHv2 5/6] iommu/intel: Rename dmar_fault() => dmar_serve_faults()

2018-02-12 Thread Dmitry Safonov
Fix the return value, parameters and a bit better naming. Signed-off-by: Dmitry Safonov <d...@arista.com> --- drivers/iommu/dmar.c| 8 +++- drivers/iommu/intel-iommu.c | 2 +- drivers/iommu/intel_irq_remapping.c | 2 +- include/linux/dmar.h| 2

[PATCHv2 5/6] iommu/intel: Rename dmar_fault() => dmar_serve_faults()

2018-02-12 Thread Dmitry Safonov
Fix the return value, parameters and a bit better naming. Signed-off-by: Dmitry Safonov --- drivers/iommu/dmar.c| 8 +++- drivers/iommu/intel-iommu.c | 2 +- drivers/iommu/intel_irq_remapping.c | 2 +- include/linux/dmar.h| 2 +- 4 files changed, 6

[PATCHv2 2/6] iommu/intel: Clean/document fault status flags

2018-02-12 Thread Dmitry Safonov
So one could decode them without opening the specification. Signed-off-by: Dmitry Safonov <d...@arista.com> --- include/linux/intel-iommu.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h

[PATCHv2 4/6] iommu/intel: Handle DMAR faults on workqueue

2018-02-12 Thread Dmitry Safonov
x86_64_start_reservations+0x2a/0x2c x86_64_start_kernel+0x14b/0x15a Move DMAR faults clearing out of irq-disabled critical section by proceeding with that in a workqueue thread. The next patch will correct the definition of dmar_fault(). Signed-off-by: Dmitry Safonov <d...@arista.com> --- d

[PATCHv2 2/6] iommu/intel: Clean/document fault status flags

2018-02-12 Thread Dmitry Safonov
So one could decode them without opening the specification. Signed-off-by: Dmitry Safonov --- include/linux/intel-iommu.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index 8dad3dd26eae..ef169d67df92

[PATCHv2 4/6] iommu/intel: Handle DMAR faults on workqueue

2018-02-12 Thread Dmitry Safonov
x86_64_start_reservations+0x2a/0x2c x86_64_start_kernel+0x14b/0x15a Move DMAR faults clearing out of irq-disabled critical section by proceeding with that in a workqueue thread. The next patch will correct the definition of dmar_fault(). Signed-off-by: Dmitry Safonov --- drivers/iommu/dmar.c

[PATCHv2 6/6] iommu/intel: Ratelimit each dmar fault printing

2018-02-12 Thread Dmitry Safonov
fault_work+0x15/0x17$\n' [..] process_one_work+0x1e8/0x3a9$\n' [..] worker_thread+0x25d/0x345$\n' [..] kthread+0xea/0xf2$\n' [..] ret_from_fork+0x58/0x90$\n' Signed-off-by: Dmitry Safonov <d...@arista.com> --- drivers/iommu/dmar.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletion

[PATCHv2 6/6] iommu/intel: Ratelimit each dmar fault printing

2018-02-12 Thread Dmitry Safonov
fault_work+0x15/0x17$\n' [..] process_one_work+0x1e8/0x3a9$\n' [..] worker_thread+0x25d/0x345$\n' [..] kthread+0xea/0xf2$\n' [..] ret_from_fork+0x58/0x90$\n' Signed-off-by: Dmitry Safonov --- drivers/iommu/dmar.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/io

[PATCHv2 3/6] iommu/intel: Introduce clear_primary_faults() helper

2018-02-12 Thread Dmitry Safonov
To my mind it's a bit more readable - and I will re-use it in the next patch. Signed-off-by: Dmitry Safonov <d...@arista.com> --- drivers/iommu/dmar.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index accf58

[PATCHv2 3/6] iommu/intel: Introduce clear_primary_faults() helper

2018-02-12 Thread Dmitry Safonov
To my mind it's a bit more readable - and I will re-use it in the next patch. Signed-off-by: Dmitry Safonov --- drivers/iommu/dmar.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index accf58388bdb..33fb4244e438

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Dmitry Safonov
On Thu, 2018-02-08 at 15:22 -0500, David Miller wrote: > From: Dmitry Safonov <d...@arista.com> > Date: Thu, 08 Feb 2018 20:14:55 + > > > On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: > >> From: Sebastian Andrzej Siewior <bige...@linutronix.de>

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Dmitry Safonov
On Thu, 2018-02-08 at 15:22 -0500, David Miller wrote: > From: Dmitry Safonov > Date: Thu, 08 Feb 2018 20:14:55 + > > > On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: > >> From: Sebastian Andrzej Siewior > >> Date: Thu, 8 Feb 2018 18:44:52 +0100 &

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Dmitry Safonov
On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: > From: Sebastian Andrzej Siewior > Date: Thu, 8 Feb 2018 18:44:52 +0100 > > > May I instead suggest to stick to ksoftirqd? So you run in softirq > > context (after return from IRQ) and if takes too long, you offload >

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Dmitry Safonov
On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: > From: Sebastian Andrzej Siewior > Date: Thu, 8 Feb 2018 18:44:52 +0100 > > > May I instead suggest to stick to ksoftirqd? So you run in softirq > > context (after return from IRQ) and if takes too long, you offload > the > > vector to

Re: [RFC][PATCH 1/6] ftrace: Remove incorrect setting of glob search field

2018-02-07 Thread Dmitry Safonov
func_g.len = 3; > func_g.search = "*foo"; > Feeding that to ftrace_match_record() will not do anything sane - we > will be looking for names containing "*foo" (->len is ignored for that > one). > > Link: http://lkml.kernel.org/r/2018012703

Re: [RFC][PATCH 1/6] ftrace: Remove incorrect setting of glob search field

2018-02-07 Thread Dmitry Safonov
oo"; > Feeding that to ftrace_match_record() will not do anything sane - we > will be looking for names containing "*foo" (->len is ignored for that > one). > > Link: http://lkml.kernel.org/r/20180127031706.ge13...@zeniv.linux.org.uk > > Cc: s

Re: [RFC] apparent bogosity in unregister_ftrace_function_probe_func()

2018-02-05 Thread Dmitry Safonov
2018-02-06 2:48 GMT+00:00 Steven Rostedt <rost...@goodmis.org>: > On Tue, 6 Feb 2018 02:44:03 + > Dmitry Safonov <0x7f454...@gmail.com> wrote: > > >> Yes, I've planned to do this.. >> As it's merge-window now I thought doing this a week later. >> S

Re: [RFC] apparent bogosity in unregister_ftrace_function_probe_func()

2018-02-05 Thread Dmitry Safonov
2018-02-06 2:48 GMT+00:00 Steven Rostedt : > On Tue, 6 Feb 2018 02:44:03 + > Dmitry Safonov <0x7f454...@gmail.com> wrote: > > >> Yes, I've planned to do this.. >> As it's merge-window now I thought doing this a week later. >> So, it's up to you - just

Re: [RFC] apparent bogosity in unregister_ftrace_function_probe_func()

2018-02-05 Thread Dmitry Safonov
2018-02-06 2:40 GMT+00:00 Steven Rostedt : > On Tue, 6 Feb 2018 11:26:14 +0900 > Masami Hiramatsu wrote: > >> No, that code looks good to me. :) >> >> BTW, did you also remove "search = buff;" line in >> unregister_ftrace_function_probe_func() too? > >

Re: [RFC] apparent bogosity in unregister_ftrace_function_probe_func()

2018-02-05 Thread Dmitry Safonov
2018-02-06 2:40 GMT+00:00 Steven Rostedt : > On Tue, 6 Feb 2018 11:26:14 +0900 > Masami Hiramatsu wrote: > >> No, that code looks good to me. :) >> >> BTW, did you also remove "search = buff;" line in >> unregister_ftrace_function_probe_func() too? > > That's a separate bug, and should be a

Re: [RFC] apparent bogosity in unregister_ftrace_function_probe_func()

2018-02-05 Thread Dmitry Safonov
2018-02-05 22:54 GMT+00:00 Steven Rostedt <rost...@goodmis.org>: > On Mon, 29 Jan 2018 22:59:42 +0900 > Masami Hiramatsu <mhira...@kernel.org> wrote: > >> On Sat, 27 Jan 2018 17:07:48 + >> Al Viro <v...@zeniv.linux.org.uk> wrote: >> >> > On

Re: [RFC] apparent bogosity in unregister_ftrace_function_probe_func()

2018-02-05 Thread Dmitry Safonov
2018-02-05 22:54 GMT+00:00 Steven Rostedt : > On Mon, 29 Jan 2018 22:59:42 +0900 > Masami Hiramatsu wrote: > >> On Sat, 27 Jan 2018 17:07:48 + >> Al Viro wrote: >> >> > On Sat, Jan 27, 2018 at 01:59:56PM +, Dmitry Safonov wrote: >> > > >

Re: [RFC] apparent bogosity in unregister_ftrace_function_probe_func()

2018-01-27 Thread Dmitry Safonov
> it does the wrong thing for MATCH_MIDDLE_ONLY and MATCH_END_ONLY > cases... > > That started in commit 3ba009297149fa45956c33ab5de7c5f4da1f28b8 > Author: Dmitry Safonov <0x7f454...@gmail.com> > Date: Tue Sep 29 19:46:14 2015 +0300 > > f

Re: [RFC] apparent bogosity in unregister_ftrace_function_probe_func()

2018-01-27 Thread Dmitry Safonov
would be processed string, not a glob. So, this unnecessary assignment broke unregistering multiple kprobs with a middle/end pattern.. > In any case, that should be done in filter_parse_regex() itself - > there are other callers that don't have such compensation and > it does the wrong thing fo

[PATCH 1/5] iommu/intel: Add __init for dmar_register_bus_notifier()

2018-01-24 Thread Dmitry Safonov
It's called only from intel_iommu_init(), which is init function. Signed-off-by: Dmitry Safonov <d...@arista.com> --- drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 9a7ffd13c7f0..accf58388bdb

[PATCH 1/5] iommu/intel: Add __init for dmar_register_bus_notifier()

2018-01-24 Thread Dmitry Safonov
It's called only from intel_iommu_init(), which is init function. Signed-off-by: Dmitry Safonov --- drivers/iommu/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 9a7ffd13c7f0..accf58388bdb 100644 --- a/drivers/iommu

[PATCH 5/5] iommu/intel: Rename dmar_fault() => dmar_serve_faults()

2018-01-24 Thread Dmitry Safonov
Fix the return value, parameters and a bit better naming. Signed-off-by: Dmitry Safonov <d...@arista.com> --- drivers/iommu/dmar.c| 8 +++- drivers/iommu/intel-iommu.c | 2 +- drivers/iommu/intel_irq_remapping.c | 2 +- include/linux/dmar.h| 2

[PATCH 5/5] iommu/intel: Rename dmar_fault() => dmar_serve_faults()

2018-01-24 Thread Dmitry Safonov
Fix the return value, parameters and a bit better naming. Signed-off-by: Dmitry Safonov --- drivers/iommu/dmar.c| 8 +++- drivers/iommu/intel-iommu.c | 2 +- drivers/iommu/intel_irq_remapping.c | 2 +- include/linux/dmar.h| 2 +- 4 files changed, 6

[PATCH 4/5] iommu/intel: Handle DMAR faults on workqueue

2018-01-24 Thread Dmitry Safonov
x86_64_start_reservations+0x2a/0x2c x86_64_start_kernel+0x14b/0x15a Move DMAR faults clearing out of irq-disabled critical section by proceeding with that in a workqueue thread. The next patch will correct the definition of dmar_fault(). Signed-off-by: Dmitry Safonov <d...@arista.com> --- d

[PATCH 2/5] iommu/intel: Clean/document fault status flags

2018-01-24 Thread Dmitry Safonov
So one could decode them without opening the specification. Signed-off-by: Dmitry Safonov <d...@arista.com> --- include/linux/intel-iommu.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h

[PATCH 4/5] iommu/intel: Handle DMAR faults on workqueue

2018-01-24 Thread Dmitry Safonov
x86_64_start_reservations+0x2a/0x2c x86_64_start_kernel+0x14b/0x15a Move DMAR faults clearing out of irq-disabled critical section by proceeding with that in a workqueue thread. The next patch will correct the definition of dmar_fault(). Signed-off-by: Dmitry Safonov --- drivers/iommu/dmar.c

[PATCH 2/5] iommu/intel: Clean/document fault status flags

2018-01-24 Thread Dmitry Safonov
So one could decode them without opening the specification. Signed-off-by: Dmitry Safonov --- include/linux/intel-iommu.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index f3274d9f46a2..a4dc9c2875cc

[PATCH 0/5] iommu/intel: Handle DMAR faults in a wq

2018-01-24 Thread Dmitry Safonov
lt;baolu...@linux.intel.com> Cc: io...@lists.linux-foundation.org Dmitry Safonov (5): iommu/intel: Add __init for dmar_register_bus_notifier() iommu/intel: Clean/document fault status flags iommu/intel: Introduce clear_primary_faults() helper iommu/intel: Handle DMAR faults on w

[PATCH 3/5] iommu/intel: Introduce clear_primary_faults() helper

2018-01-24 Thread Dmitry Safonov
To my mind it's a bit more readable - and I will re-use it in the next patch. Signed-off-by: Dmitry Safonov <d...@arista.com> --- drivers/iommu/dmar.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index accf58

[PATCH 3/5] iommu/intel: Introduce clear_primary_faults() helper

2018-01-24 Thread Dmitry Safonov
To my mind it's a bit more readable - and I will re-use it in the next patch. Signed-off-by: Dmitry Safonov --- drivers/iommu/dmar.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index accf58388bdb..33fb4244e438

[PATCH 0/5] iommu/intel: Handle DMAR faults in a wq

2018-01-24 Thread Dmitry Safonov
A softlockup-panic fix I've meet on kernel test suite. While at it, fix a couple of minor issues. Cc: Alex Williamson Cc: David Woodhouse Cc: Ingo Molnar Cc: Joerg Roedel Cc: Lu Baolu Cc: io...@lists.linux-foundation.org Dmitry Safonov (5): iommu/intel: Add __init

Re: [RFC PATCH 0/4] softirq: Per vector threading v3

2018-01-23 Thread Dmitry Safonov
On Tue, 2018-01-23 at 11:13 +0100, Paolo Abeni wrote: > Hi, > > On Fri, 2018-01-19 at 16:46 +0100, Frederic Weisbecker wrote: > > As per Linus suggestion, this take doesn't limit the number of > > occurences > > per jiffy anymore but instead defers a vector to workqueues as soon > > as > > it

Re: [RFC PATCH 0/4] softirq: Per vector threading v3

2018-01-23 Thread Dmitry Safonov
On Tue, 2018-01-23 at 11:13 +0100, Paolo Abeni wrote: > Hi, > > On Fri, 2018-01-19 at 16:46 +0100, Frederic Weisbecker wrote: > > As per Linus suggestion, this take doesn't limit the number of > > occurences > > per jiffy anymore but instead defers a vector to workqueues as soon > > as > > it

Re: [PATCH] selftests/x86: Add {,_32,_64} targets

2018-01-18 Thread Dmitry Safonov
On Thu, 2018-01-18 at 22:19 +, Dmitry Safonov wrote: > One can only use `make all` or `make _` > as make targets. > `make ` doesn't work as Ingo noticed: > x86> make test_vsyscall > gcc -O2 -g -std=gnu99 -pthread -Wall -no-pie test_vsyscall.c -o > test_vsyscal

Re: [PATCH] selftests/x86: Add {,_32,_64} targets

2018-01-18 Thread Dmitry Safonov
On Thu, 2018-01-18 at 22:19 +, Dmitry Safonov wrote: > One can only use `make all` or `make _` > as make targets. > `make ` doesn't work as Ingo noticed: > x86> make test_vsyscall > gcc -O2 -g -std=gnu99 -pthread -Wall -no-pie test_vsyscall.c -o > test_vsyscal

[PATCHv2] selftests/x86: Add {,_32,_64} targets

2018-01-18 Thread Dmitry Safonov
tion.org> Cc: Shuah Khan <sh...@kernel.org> Cc: Thomas Gleixner <t...@linutronix.de> Cc: linux-kselft...@vger.kernel.org Cc: x...@kernel.org Reported-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Dmitry Safonov <d...@arista.com> --- v2: collide two target lines $(1) and

[PATCHv2] selftests/x86: Add {,_32,_64} targets

2018-01-18 Thread Dmitry Safonov
nux-kselft...@vger.kernel.org Cc: x...@kernel.org Reported-by: Ingo Molnar Signed-off-by: Dmitry Safonov --- v2: collide two target lines $(1) and $(1)_{64,32} tools/testing/selftests/x86/Makefile | 12 1 file changed, 12 insertions(+) diff --git a/tools/testing/selftests/x86/Makefile

[PATCH] selftests/x86: Add {,_32,_64} targets

2018-01-18 Thread Dmitry Safonov
tion.org> Cc: Shuah Khan <sh...@kernel.org> Cc: Thomas Gleixner <t...@linutronix.de> Cc: linux-kselft...@vger.kernel.org Cc: x...@kernel.org Reported-by: Ingo Molnar <mi...@kernel.org> Signed-off-by: Dmitry Safonov <d...@arista.com> --- tools/testing/selftests/x86/Makefile

[PATCH] selftests/x86: Add {,_32,_64} targets

2018-01-18 Thread Dmitry Safonov
nux-kselft...@vger.kernel.org Cc: x...@kernel.org Reported-by: Ingo Molnar Signed-off-by: Dmitry Safonov --- tools/testing/selftests/x86/Makefile | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile in

[PATCHv2 1/5] Documentation/pktgen: Clearify how-to use pktgen samples

2018-01-18 Thread Dmitry Safonov
to `source functions.sh`. o Document how-to unset a behaviour flag, note about history expansion. o Fix pgset spi parameter value. Cc: Jonathan Corbet <cor...@lwn.net> Cc: linux-...@vger.kernel.org Signed-off-by: Dmitry Safonov <d...@arista.com> --- Documentation/networking/pkt

[PATCHv2 1/5] Documentation/pktgen: Clearify how-to use pktgen samples

2018-01-18 Thread Dmitry Safonov
to `source functions.sh`. o Document how-to unset a behaviour flag, note about history expansion. o Fix pgset spi parameter value. Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Signed-off-by: Dmitry Safonov --- Documentation/networking/pktgen.txt | 19 ++- 1 file changed, 14

[PATCHv2 2/5] pktgen: Add missing !flag parameters

2018-01-18 Thread Dmitry Safonov
o FLOW_SEQ now can be disabled with pgset "flag !FLOW_SEQ" o FLOW_SEQ and FLOW_RND are antonyms, as it's shown by pktgen_if_show() o IPSEC now may be disabled Note, that IPV6 is enabled with dst6/src6 parameters, not with a flag parameter. Signed-off-by: Dmitry Safonov <d...@arista.

[PATCHv2 2/5] pktgen: Add missing !flag parameters

2018-01-18 Thread Dmitry Safonov
o FLOW_SEQ now can be disabled with pgset "flag !FLOW_SEQ" o FLOW_SEQ and FLOW_RND are antonyms, as it's shown by pktgen_if_show() o IPSEC now may be disabled Note, that IPV6 is enabled with dst6/src6 parameters, not with a flag parameter. Signed-off-by: Dmitry Safonov --- net/cor

[PATCHv2 0/5] pktgen: Behavior flags fixes

2018-01-18 Thread Dmitry Safonov
nd...@gmail.com> Cc: Eric Dumazet <eduma...@google.com> Cc: Ingo Molnar <mi...@kernel.org> Cc: Johannes Berg <johannes.b...@intel.com> Cc: Mark Rutland <mark.rutl...@arm.com> Cc: Radu Rendec <rren...@arista.com> Cc: "Reshetova, Elena" <elena.reshet...@int

[PATCHv2 0/5] pktgen: Behavior flags fixes

2018-01-18 Thread Dmitry Safonov
Cc: Mark Rutland Cc: Radu Rendec Cc: "Reshetova, Elena" Cc: net...@vger.kernel.org Dmitry Safonov (5): Documentation/pktgen: Clearify how-to use pktgen samples pktgen: Add missing !flag parameters pktgen: Add behaviour flags macro to generate flags/names pktgen: Remove brute-for

[PATCHv2 5/5] pktgen: Clean read user supplied flag mess

2018-01-18 Thread Dmitry Safonov
Don't use error-prone-brute-force way. Signed-off-by: Dmitry Safonov <d...@arista.com> --- net/core/pktgen.c | 144 +++--- 1 file changed, 39 insertions(+), 105 deletions(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index f98831

[PATCHv2 4/5] pktgen: Remove brute-force printing of flags

2018-01-18 Thread Dmitry Safonov
Add macro generated pkt_flag_names array, with a little help of which the flags can be printed by using an index. Signed-off-by: Dmitry Safonov <d...@arista.com> --- net/core/pktgen.c | 77 ++- 1 file changed, 19 insertions(+), 58 del

[PATCHv2 4/5] pktgen: Remove brute-force printing of flags

2018-01-18 Thread Dmitry Safonov
Add macro generated pkt_flag_names array, with a little help of which the flags can be printed by using an index. Signed-off-by: Dmitry Safonov --- net/core/pktgen.c | 77 ++- 1 file changed, 19 insertions(+), 58 deletions(-) diff --git a/net

[PATCHv2 5/5] pktgen: Clean read user supplied flag mess

2018-01-18 Thread Dmitry Safonov
Don't use error-prone-brute-force way. Signed-off-by: Dmitry Safonov --- net/core/pktgen.c | 144 +++--- 1 file changed, 39 insertions(+), 105 deletions(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index f9883139e311..e335daa40211 100644

[PATCHv2 3/5] pktgen: Add behaviour flags macro to generate flags/names

2018-01-18 Thread Dmitry Safonov
PKT_FALGS macro will be used to add package behavior names definitions to simplify the code that prints/reads pkg flags. Sorted the array in order of printing the flags in pktgen_if_show() Note: Renamed IPSEC_ON => IPSEC for simplicity. No visible behavior change expected. Signed-off-by: Dmi

[PATCHv2 3/5] pktgen: Add behaviour flags macro to generate flags/names

2018-01-18 Thread Dmitry Safonov
PKT_FALGS macro will be used to add package behavior names definitions to simplify the code that prints/reads pkg flags. Sorted the array in order of printing the flags in pktgen_if_show() Note: Renamed IPSEC_ON => IPSEC for simplicity. No visible behavior change expected. Signed-off-by: Dmi

Re: [RFC 4/6] softirq: Run per-group per-cpu ksoftirqd thread

2018-01-18 Thread Dmitry Safonov
On Thu, 2018-01-18 at 18:00 +0100, Mike Galbraith wrote: > On Thu, 2018-01-18 at 16:12 +0000, Dmitry Safonov wrote: > > > > diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h > > index 2ea09896bd6e..17e1a04445fa 100644 > > --- a/include/linux/interrup

Re: [RFC 4/6] softirq: Run per-group per-cpu ksoftirqd thread

2018-01-18 Thread Dmitry Safonov
On Thu, 2018-01-18 at 18:00 +0100, Mike Galbraith wrote: > On Thu, 2018-01-18 at 16:12 +0000, Dmitry Safonov wrote: > > > > diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h > > index 2ea09896bd6e..17e1a04445fa 100644 > > --- a/include/linux/interrup

[RFC 1/6] softirq: Add softirq_groups boot parameter

2018-01-18 Thread Dmitry Safonov
a per-cpu kthread which will process deferred softirqs of the group. The parameter will allow an admin define how many ksoftirqd threads will be created on each cpu and which softirqs have the same deferring group. Signed-off-by: Dmitry Safonov <d...@arista.com> --- Documentation/admin-guide/

[RFC 1/6] softirq: Add softirq_groups boot parameter

2018-01-18 Thread Dmitry Safonov
a per-cpu kthread which will process deferred softirqs of the group. The parameter will allow an admin define how many ksoftirqd threads will be created on each cpu and which softirqs have the same deferring group. Signed-off-by: Dmitry Safonov --- Documentation/admin-guide/kernel-parameters.txt

[RFC 3/6] softirq: Add reverse group-to-softirq map

2018-01-18 Thread Dmitry Safonov
For faster operation with pending mask: pending &= group_to_softirq[group_nr]; Signed-off-by: Dmitry Safonov <d...@arista.com> --- kernel/softirq.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/kernel/softirq.c b/kernel/softirq.c index ca8c3db4570d..7de5791c0

[RFC 5/6] softirq: Add time accounting per-softirq type

2018-01-18 Thread Dmitry Safonov
to serve incoming packages. The time-based decision will work better than check of re-raised softirq after processing previous one. Because the check might not work even under softirq storm if softirqs are raised too slowly (e.g. because of hw). Signed-off-by: Dmitry Safonov <d...@arista.

[RFC 5/6] softirq: Add time accounting per-softirq type

2018-01-18 Thread Dmitry Safonov
to serve incoming packages. The time-based decision will work better than check of re-raised softirq after processing previous one. Because the check might not work even under softirq storm if softirqs are raised too slowly (e.g. because of hw). Signed-off-by: Dmitry Safonov --- include/linux

[RFC 3/6] softirq: Add reverse group-to-softirq map

2018-01-18 Thread Dmitry Safonov
For faster operation with pending mask: pending &= group_to_softirq[group_nr]; Signed-off-by: Dmitry Safonov --- kernel/softirq.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/kernel/softirq.c b/kernel/softirq.c index ca8c3db4570d..7de5791c08f9 100644 --- a/ke

[RFC 4/6] softirq: Run per-group per-cpu ksoftirqd thread

2018-01-18 Thread Dmitry Safonov
-group which includes all softirqs and running only one ksoftirqd thread per-cpu. Signed-off-by: Dmitry Safonov <d...@arista.com> --- include/linux/interrupt.h | 16 +++- kernel/sched/cputime.c| 27 --- kernel/softirq.c | 187 -- ne

[RFC 6/6] softirq/sched: Account si cpu time to ksoftirqd(s)

2018-01-18 Thread Dmitry Safonov
decide if softirq needs to be served or deferred. It's possible to tune this with ksoftirqd nice policy. Signed-off-by: Dmitry Safonov <d...@arista.com> --- include/linux/interrupt.h | 1 + kernel/sched/fair.c | 38 ++ kernel/sched/sched

[RFC 4/6] softirq: Run per-group per-cpu ksoftirqd thread

2018-01-18 Thread Dmitry Safonov
-group which includes all softirqs and running only one ksoftirqd thread per-cpu. Signed-off-by: Dmitry Safonov --- include/linux/interrupt.h | 16 +++- kernel/sched/cputime.c| 27 --- kernel/softirq.c | 187 -- net/ipv4/tcp_output.c

[RFC 6/6] softirq/sched: Account si cpu time to ksoftirqd(s)

2018-01-18 Thread Dmitry Safonov
decide if softirq needs to be served or deferred. It's possible to tune this with ksoftirqd nice policy. Signed-off-by: Dmitry Safonov --- include/linux/interrupt.h | 1 + kernel/sched/fair.c | 38 ++ kernel/sched/sched.h | 19 +++ kernel/sof

[RFC 2/6] softirq: Introduce mask for __do_softirq()

2018-01-18 Thread Dmitry Safonov
-off-by: Dmitry Safonov <d...@arista.com> --- include/linux/interrupt.h | 8 kernel/softirq.c | 27 ++- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5bb6b435f0bb..2ea098

[RFC 2/6] softirq: Introduce mask for __do_softirq()

2018-01-18 Thread Dmitry Safonov
-off-by: Dmitry Safonov --- include/linux/interrupt.h | 8 kernel/softirq.c | 27 ++- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5bb6b435f0bb..2ea09896bd6e 100644

<    3   4   5   6   7   8   9   10   11   12   >