From patchwork Tue Oct 3 21:44:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 9983555 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BE13960365 for ; Tue, 3 Oct 2017 21:44:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B27D728A0C for ; Tue, 3 Oct 2017 21:44:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6F4028A2D; Tue, 3 Oct 2017 21:44:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 525CA28A0C for ; Tue, 3 Oct 2017 21:44:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751444AbdJCVo4 (ORCPT ); Tue, 3 Oct 2017 17:44:56 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:54951 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbdJCVoz (ORCPT ); Tue, 3 Oct 2017 17:44:55 -0400 Received: from p4fea5b32.dip0.t-ipconnect.de ([79.234.91.50] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1dzUzQ-0002cj-52; Tue, 03 Oct 2017 23:44:32 +0200 Date: Tue, 3 Oct 2017 23:44:33 +0200 (CEST) From: Thomas Gleixner To: YASUAKI ISHIMATSU cc: Kashyap Desai , Hannes Reinecke , Marc Zyngier , Christoph Hellwig , axboe@kernel.dk, mpe@ellerman.id.au, keith.busch@intel.com, peterz@infradead.org, LKML , linux-scsi@vger.kernel.org, Sumit Saxena , Shivasharan Srikanteshwara Subject: Re: system hung up when offlining CPUs In-Reply-To: <78ce7246-c567-3f5f-b168-9bcfc659d4bd@gmail.com> Message-ID: References: <20170809124213.0d9518bb@why.wild-wind.fr.eu.org> <20170821131809.GA17564@lst.de> <8e0d76cd-7cd4-3a98-12ba-815f00d4d772@gmail.com> <2f2ae1bc-4093-d083-6a18-96b9aaa090c9@gmail.com> <8cb26204cb5402824496bbb6b636e0af@mail.gmail.com> <3ce6837a-9aba-0ff4-64b9-7ebca5afca13@gmail.com> <78ce7246-c567-3f5f-b168-9bcfc659d4bd@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 1 >/sys/kernel/debug/tracing/options/stacktrace Then offline CPUs 24-29. After that do # cat /sys/kernel/debug/tracing/trace >somefile Please compress the file and upload it to some place or if you have no place to upload it then send it to me in private mail. Thanks, tglx 8<------------ --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -171,11 +171,16 @@ void irq_set_thread_affinity(struct irq_ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force) { + const struct cpumask *eff = irq_data_get_effective_affinity_mask(data); struct irq_desc *desc = irq_data_to_desc(data); struct irq_chip *chip = irq_data_get_irq_chip(data); int ret; ret = chip->irq_set_affinity(data, mask, force); + + trace_printk("irq: %u ret %d mask: %*pbl eff: %*pbl\n", data->irq, ret, + cpumask_pr_args(mask), cpumask_pr_args(eff)); + switch (ret) { case IRQ_SET_MASK_OK: case IRQ_SET_MASK_OK_DONE: