Re: Question on handling managed IRQs when hotplugging CPUs

2019-02-01 Thread Thomas Gleixner
On Fri, 1 Feb 2019, Hannes Reinecke wrote: > Thing is, if we have _managed_ CPU hotplug (ie if the hardware provides some > means of quiescing the CPU before hotplug) then the whole thing is trivial; > disable SQ and wait for all outstanding commands to complete. > Then trivially all requests are c

Re: Question on handling managed IRQs when hotplugging CPUs

2019-01-29 Thread Thomas Gleixner
On Tue, 29 Jan 2019, John Garry wrote: > On 29/01/2019 12:01, Thomas Gleixner wrote: > > If the last CPU which is associated to a queue (and the corresponding > > interrupt) goes offline, then the subsytem/driver code has to make sure > > that: > > > >1) No mo

Re: Question on handling managed IRQs when hotplugging CPUs

2019-01-29 Thread Thomas Gleixner
On Tue, 29 Jan 2019, Hannes Reinecke wrote: > That actually is a very good question, and I have been wondering about this > for quite some time. > > I find it a bit hard to envision a scenario where the IRQ affinity is > automatically (and, more importantly, atomically!) re-routed to one of the >

Re: [PATCH 11/14] irq: add support for allocating (and affinitizing) sets of IRQs

2018-10-30 Thread Thomas Gleixner
On Tue, 30 Oct 2018, Jens Axboe wrote: > On 10/30/18 11:25 AM, Thomas Gleixner wrote: > > Jens, > > > > On Tue, 30 Oct 2018, Jens Axboe wrote: > >> On 10/30/18 10:02 AM, Keith Busch wrote: > >>> pci_alloc_irq_vectors_affinity() starts at the provided max

Re: [PATCH 11/14] irq: add support for allocating (and affinitizing) sets of IRQs

2018-10-30 Thread Thomas Gleixner
Jens, On Tue, 30 Oct 2018, Jens Axboe wrote: > On 10/30/18 10:02 AM, Keith Busch wrote: > > pci_alloc_irq_vectors_affinity() starts at the provided max_vecs. If > > that doesn't work, it will iterate down to min_vecs without returning to > > the caller. The caller doesn't have a chance to adjust i

Re: [PATCH 11/14] irq: add support for allocating (and affinitizing) sets of IRQs

2018-10-29 Thread Thomas Gleixner
affinitized correctly across the machine. > > Cc: Thomas Gleixner > Cc: linux-ker...@vger.kernel.org > Reviewed-by: Hannes Reinecke > Signed-off-by: Jens Axboe This looks good. Vs. merge logistics: I'm expecting some other changes in that area as per discussion with megasas (I

Re: move bus (PCI, PCMCIA, EISA, rapdio) config to drivers/

2018-10-13 Thread Thomas Gleixner
n needed) and then handles everything in the bus-specific > Kconfig file under drivers/. Nice cleanup. Acked-by: Thomas Gleixner

Re: [PATCH] target: Use WARNON_NON_RT(!irqs_disabled())

2018-03-22 Thread Thomas Gleixner
On Thu, 22 Mar 2018, Arnaldo Carvalho de Melo wrote: > Em Wed, Mar 21, 2018 at 11:43:58AM -0700, Linus Torvalds escreveu: > > [ Adding PeterZ to participants due to query about lockdep_assert() ] > > > > On Wed, Mar 21, 2018 at 8:38 AM, Arnaldo Carvalho de Melo > > wrote: > > > > > > asse

Re: [PATCH] target: Use WARNON_NON_RT(!irqs_disabled())

2018-03-22 Thread Thomas Gleixner
On Wed, 21 Mar 2018, Linus Torvalds wrote: > [ Adding PeterZ to participants due to query about lockdep_assert() ] > > On Wed, Mar 21, 2018 at 8:38 AM, Arnaldo Carvalho de Melo > wrote: > > > > assert_spin_locked(&cmd->t_state_lock); > > - WARN_ON_ONCE(!irqs_disabled()); > > +

RE: system hung up when offlining CPUs

2017-10-31 Thread Thomas Gleixner
On Mon, 30 Oct 2017, Shivasharan Srikanteshwara wrote: > In managed-interrupts case, interrupts which were affine to the offlined > CPU is not getting migrated to another available CPU. But the > documentation at below link says that "all interrupts" are migrated to a > new CPU. So not all interru

Re: system hung up when offlining CPUs

2017-10-16 Thread Thomas Gleixner
Yasuaki, On Mon, 16 Oct 2017, YASUAKI ISHIMATSU wrote: > Hi Thomas, > > > Can you please apply the patch below on top of Linus tree and retest? > > > > Please send me the outputs I asked you to provide last time in any case > > (success or fail). > > The issue still occurs even if I applied you

Re: system hung up when offlining CPUs

2017-10-04 Thread Thomas Gleixner
On Mon, 2 Oct 2017, YASUAKI ISHIMATSU wrote: > > We are talking about megasas driver. > So I added linux-scsi and maintainers of megasas into the thread. Another question: Is this the in tree megasas driver and you are observing this on Linus latest tree, i.e. 4.14-rc3+ ? Thanks, tglx

Re: system hung up when offlining CPUs

2017-10-04 Thread Thomas Gleixner
On Tue, 3 Oct 2017, Thomas Gleixner wrote: > Can you please apply the debug patch below. I found an issue with managed interrupts when the affinity mask of an managed interrupt spawns multiple CPUs. Explanation in the changelog below. I'm not sure that this cures the problems you have

Re: system hung up when offlining CPUs

2017-10-03 Thread Thomas Gleixner
On Mon, 2 Oct 2017, YASUAKI ISHIMATSU wrote: > On 09/16/2017 11:02 AM, Thomas Gleixner wrote: > > Which driver are we talking about? > > We are talking about megasas driver. Can you please apply the debug patch below. After booting enable stack traces for the tracer: # echo

Re: system hung up when offlining CPUs

2017-09-16 Thread Thomas Gleixner
On Sat, 16 Sep 2017, Thomas Gleixner wrote: > On Thu, 14 Sep 2017, YASUAKI ISHIMATSU wrote: > > Here are one irq's info of megasas: > > > > - Before offline CPU > > /proc/irq/70/smp_affinity_list > > 24-29 &g

Re: system hung up when offlining CPUs

2017-09-16 Thread Thomas Gleixner
On Thu, 14 Sep 2017, YASUAKI ISHIMATSU wrote: > On 09/13/2017 09:33 AM, Thomas Gleixner wrote: > >> Question - "what happens once __cpu_disable is called and some of the > >> queued > >> interrupt has affinity to that particular CPU ?" > >> I ass

RE: system hung up when offlining CPUs

2017-09-13 Thread Thomas Gleixner
On Wed, 13 Sep 2017, Kashyap Desai wrote: > > On 09/12/2017 08:15 PM, YASUAKI ISHIMATSU wrote: > > > + linux-scsi and maintainers of megasas > > >> In my server, IRQ#66-89 are sent to CPU#24-29. And if I offline > > >> CPU#24-29, I/O does not work, showing the following messages. > > This i

[patch 4/5] scsi/bnx2fc: Simplify CPU hotplug code

2017-07-24 Thread Thomas Gleixner
callbacks and remove the extra for_each_online_cpu() loops. Signed-off-by: Thomas Gleixner --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 69 -- include/linux/cpuhotplug.h|1 2 files changed, 15 insertions(+), 55 deletions(-) --- a/drivers/scsi/bnx2fc

[patch 2/5] scsi/bnx2fc: Prevent recursive cpuhotplug locking

2017-07-24 Thread Thomas Gleixner
fix this. Reported-by: kernel test robot Signed-off-by: Thomas Gleixner --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -2766,15 +2766,16 @@ static

[patch 3/5] scsi/bnx2i: Prevent recursive cpuhotplug locking

2017-07-24 Thread Thomas Gleixner
fix this. Reported-by: Steven Rostedt Signed-off-by: Thomas Gleixner --- drivers/scsi/bnx2i/bnx2i_init.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) --- a/drivers/scsi/bnx2i/bnx2i_init.c +++ b/drivers/scsi/bnx2i/bnx2i_init.c @@ -516,15 +516,16 @@ static int __init

[patch 0/5] scsi/bnx2*: Plug hotplug race, correct locking and simplify hotplug code

2017-07-24 Thread Thomas Gleixner
The conversion of the cpu hotplug locking to a percpu rwsem does not longer allow recursive locking of the hotplug lock. The BNX2I and BNX2FC drivers install/remove hotplug states with the hotplug lock held. The install/removal code acquired the hotplug lock as well. While looking into this, I no

[patch 5/5] scsi/bnx2i: Simplify cpu hotplug code

2017-07-24 Thread Thomas Gleixner
callbacks and remove the extra for_each_online_cpu() loops. Signed-off-by: Thomas Gleixner --- drivers/scsi/bnx2i/bnx2i_init.c | 65 +--- include/linux/cpuhotplug.h |1 2 files changed, 15 insertions(+), 51 deletions(-) --- a/drivers/scsi/bnx2i

[patch 1/5] scsi/bnx2fc: Plug CPU hotplug race

2017-07-24 Thread Thomas Gleixner
or access freed and potentially reused memory. Restructure the code so the thread check and wakeup happens with the fp_work_lock held. Signed-off-by: Thomas Gleixner --- drivers/scsi/bnx2fc/bnx2fc_hwi.c | 45 +++ 1 file changed, 23 insertions(+), 22

Re: [BUG] lockdep splat with cpu_hotplug_lock

2017-07-21 Thread Thomas Gleixner
On Thu, 20 Jul 2017, James Bottomley wrote: > [redirecting to linux-scsi] > On Thu, 2017-07-20 at 19:35 -0400, Steven Rostedt wrote: > > My tests triggered this splat on 4.13-rc1: > > > > Loading iSCSI transport class v2.0-870. > > QLogic NetXtreme II iSCSI Driver bnx2i v2.7.10.1 (Jul 16, 2014) >

[patch 04/10] scsi/bnx2i: Convert to hotplug state machine

2016-12-21 Thread Thomas Gleixner
. Signed-off-by: Sebastian Andrzej Siewior Cc: Martin K. Petersen Cc: James E.J. Bottomley Cc: linux-scsi@vger.kernel.org Cc: Chad Dupuis Cc: qlogic-storage-upstr...@qlogic.com Cc: Johannes Thumshirn Cc: Christoph Hellwig Signed-off-by: Thomas Gleixner --- drivers/scsi/bnx2i/bnx2i_init.c | 80

[patch 03/10] scsi/bnx2fc: Convert to hotplug state machine

2016-12-21 Thread Thomas Gleixner
. Signed-off-by: Sebastian Andrzej Siewior Cc: Martin K. Petersen Cc: James E.J. Bottomley Cc: linux-scsi@vger.kernel.org Cc: Chad Dupuis Cc: qlogic-storage-upstr...@qlogic.com Cc: Johannes Thumshirn Cc: Christoph Hellwig Signed-off-by: Thomas Gleixner --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 81

Re: [PREEMPT-RT] bnx2i + bnx2fc: convert to generic workqueue (#2)

2016-12-09 Thread Thomas Gleixner
On Tue, 29 Nov 2016, Martin K. Petersen wrote: > > "Sebastian" == Sebastian Andrzej Siewior writes: > > Sebastian> This is the a repost + fixups to get the patches applied > Sebastian> against v4.9-rc4. mkp's scsi for-next tree can be merged > Sebastian> with no conflicts. > > Chad? Polit

Re: [PREEMPT-RT] [REPOST PATCH 1/5] scsi: bnx2i: convert to kworker

2016-11-07 Thread Thomas Gleixner
On Mon, 7 Nov 2016, Christoph Hellwig wrote: > It seems like the whole damn driver should just use threaded interrupts. > Of course it's a giant beast and not just the iSCSI one. But even > if we don't go all the way I'd much prefer workqueues. kthread work > is simply the worst API ever and I'd

Re: [PATCH v1 0/2] genirq: support multiple IRQ notifier.

2016-03-25 Thread Thomas Gleixner
On Fri, 25 Mar 2016, Christoph Hellwig wrote: > On Fri, Mar 25, 2016 at 08:51:51AM -0700, Weongyo Jeong wrote: > > Each irq_desc only supports one IRQ affinity notifier at current > > implementation so when we try to register another notifier, it silently > > unregister previous entry and register

Re: [BUG] mpt2sas: driver init fails on kernel >=4.2 for 9211-8i IT

2016-03-23 Thread Thomas Gleixner
On Thu, 24 Mar 2016, Matthias Prager wrote: > The timeout happens reliably after two warm boots with a 'bad' kernel > after coming from a 'good' kernel, and also after one cold boot with a > 'bad' kernel (meaning cold booting a 'bad' kernel leads directly to the > timeout and warm booting needs a s

Re: Fwd: [lkp] [dma] 6894258eda: mpt2sas0: reply_post_free pool: pci_pool_alloc failed

2015-09-17 Thread Thomas Gleixner
On Thu, 17 Sep 2015, Linus Torvalds wrote: > On Thu, Sep 17, 2015 at 1:06 PM, Christoph Hellwig wrote: > > > > This was caused by my commit, and I already acked a patch from Junichi > > Nomura to fix which should land in your inbox ASAP. I'll send a pull request tomorrow. Thanks, tglx

[patch 04/16] scsi: qla1280: Add missing destroy_timer_on_stack()

2014-03-23 Thread Thomas Gleixner
Otherwise we leak a tracking object when DEBUG_OBJECTS is enabled. This code should use wait_for_completion_timeout() instead, but that's a different issue. Signed-off-by: Thomas Gleixner Cc: Michael Reed Cc: scsi --- drivers/scsi/qla1280.c |1 + 1 file changed, 1 insertion(+)

Re: please fix FUSION (Was:[v3.13][v3.14][Regression]kthread:makekthread_create()killable)

2014-03-23 Thread Thomas Gleixner
On Sun, 23 Mar 2014, James Bottomley wrote: > On Sun, 2014-03-23 at 09:04 +0100, Thomas Gleixner wrote: > > On Sun, 23 Mar 2014, Tetsuo Handa wrote: > > > > > Thomas Gleixner wrote: > > > > But then systemd/udev mutters: > > > > > > > &g

Re: please fix FUSION (Was:[v3.13][v3.14][Regression]kthread:makekthread_create()killable)

2014-03-23 Thread Thomas Gleixner
On Sun, 23 Mar 2014, Tetsuo Handa wrote: > Thomas Gleixner wrote: > > But then systemd/udev mutters: > > > >"You migh be able to work around the timeout with udev rules and > > OPTIONS+="event_timeout=120", but that code was maybe never us

Re: [RESEND][PATCH 1/2] lib/scatterlist: Make ARCH_HAS_SG_CHAIN an actual Kconfig

2014-03-22 Thread Thomas Gleixner
On Sat, 22 Mar 2014, James Bottomley wrote: > On Sat, 2014-03-22 at 11:13 -0700, Laura Abbott wrote: > > Rather than have architectures #define ARCH_HAS_SG_CHAIN in an architecture > > specific scatterlist.h, make it a proper Kconfig option and use that > > instead. At same time, remove the header

Re: please fix FUSION (Was: [v3.13][v3.14][Regression]kthread:makekthread_create()killable)

2014-03-22 Thread Thomas Gleixner
On Sat, 22 Mar 2014, Thomas Gleixner wrote: > On Sat, 22 Mar 2014, Oleg Nesterov wrote: > > Personally I dislike this change. In fact I think it is ugly. But this > > is only my opinion. > > It's not only ugly, it's activly wrong. It's as wrong as 786235e

Re: please fix FUSION (Was: [v3.13][v3.14][Regression]kthread:makekthread_create()killable)

2014-03-22 Thread Thomas Gleixner
On Sat, 22 Mar 2014, Oleg Nesterov wrote: > On 03/22, Tetsuo Handa wrote: > > Many kernel operations (e.g. mutex_lock() wait_event() > > wait_for_completion()) > > ignore SIGKILL and the current users depend on SIGKILL being ignored. Thus, > > commit 786235ee sounds like a kernel API breakage. >

Re: [RESEND][PATCH 1/2] lib/scatterlist: Make ARCH_HAS_SG_CHAIN an actual Kconfig

2014-03-22 Thread Thomas Gleixner
> Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Cc: Andrew Morton > Signed-off-by: Laura Abbott For the x86 part: Acked-by: Thomas Gleixner -- To unsubscribe from this list: send the line "unsubscribe linux-