Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp135172pxb; Fri, 19 Feb 2021 21:22:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJU6Zxg/tSPiGn9lKUiVJRe+D6rlUdgjK3RcZp9pNowhaeOeJXek0Buzcfp1aAjdQCVTuR X-Received: by 2002:aa7:c314:: with SMTP id l20mr776425edq.148.1613798555790; Fri, 19 Feb 2021 21:22:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613798555; cv=none; d=google.com; s=arc-20160816; b=T9072vx36UzfC3YunQ7fR2xChl/CKvBlGWy9F6DzKxwkcAO6yU52OAV36us0QLBQ57 cWAvsHjRB4bZfmOzswDMd45LDTdKCGwARYJRT7pYR9OnNKrZDwGouzd1583q/JDuV3tR eAtdgFg5QEisCT+uV4ZIrDogvByIeH11gucr8SDdsOvbSnpGJ/QbGaoPyBNxlh2FLDuK /U0vnytAJq6UJfiVgF29H6hH8nHjlx/sRBFbwcOkQDURLF02f6ryVCBeaudhnsbsxH1f dwTNQE7mB+XOebw/OJTyJpubpHVlOYYwVNy+rOf4qIVcP0uZFklTS4q4szOG3LFiqbnk LL8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date; bh=ZriGVv9YQXT8fbBFmRtH0q5Dnf8WrgIZlD6yXOws4e8=; b=b6GCo57s4h8H+i0pVohWpJ/ZgKrICs3lsJ+JMX76wh8HQA0KDkRhfZPoBkkq8oMVRf 0kTzSkj4SUCEnDFB3isGnGavDcGvgf1OWF+xQfa1hrpSgLTzCVc0Qamzb+UKPRjIv4Vd SrT3TOWlNfw3+y5lxwMcSTVEXNTZjzxklfmetTN+V7egfPiaYmP6UsVG6OX8qkBMOsJ2 Wy5AVeDfd4U23giqn0LfwXQSnmUIZlSZxaIcRZxgHQXlzXHdd3xhLlZooIJ0d1qBCzFb e0KP8j7OyvHBIXn+2E9jsHfZ0jETXT/Hazk/b9C+ZKdslnYu7t1nQVQkVsBr2aWJdAf9 9thQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si402926edn.428.2021.02.19.21.22.12; Fri, 19 Feb 2021 21:22:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229937AbhBTFSz (ORCPT + 99 others); Sat, 20 Feb 2021 00:18:55 -0500 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:35632 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229825AbhBTFSy (ORCPT ); Sat, 20 Feb 2021 00:18:54 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by kvm5.telegraphics.com.au (Postfix) with ESMTP id CE37828237; Sat, 20 Feb 2021 00:18:03 -0500 (EST) Date: Sat, 20 Feb 2021 16:18:07 +1100 (AEDT) From: Finn Thain To: Xiaofei Tan cc: "Song Bao Hua (Barry Song)" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linuxarm@openeuler.org" , linux-m68k@vger.kernel.org Subject: Re: [Linuxarm] Re: [PATCH for-next 00/32] spin lock usage optimization for SCSI drivers In-Reply-To: <7bc39d19-f4cc-8028-11e6-c0e45421a765@huawei.com> Message-ID: <588a87f-ae42-0b7-749e-c780ce5c3e4f@telegraphics.com.au> References: <1612697823-8073-1-git-send-email-tanxiaofei@huawei.com> <31cd807d-3d0-ed64-60d-fde32cb3833c@telegraphics.com.au> <7bc39d19-f4cc-8028-11e6-c0e45421a765@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Feb 2021, Xiaofei Tan wrote: > On 2021/2/9 13:06, Finn Thain wrote: > > On Tue, 9 Feb 2021, Song Bao Hua (Barry Song) wrote: > > > > > > On Sun, 7 Feb 2021, Xiaofei Tan wrote: > > > > > > > > > Replace spin_lock_irqsave with spin_lock in hard IRQ of SCSI > > > > > drivers. There are no function changes, but may speed up if > > > > > interrupt happen too often. > > > > > > > > This change doesn't necessarily work on platforms that support > > > > nested interrupts. > > > > > > > > Were you able to measure any benefit from this change on some > > > > other platform? > > > > > > I think the code disabling irq in hardIRQ is simply wrong. > > > Since this commit > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e58aa3d2d0cc > > > genirq: Run irq handlers with interrupts disabled > > > > > > interrupt handlers are definitely running in a irq-disabled context > > > unless irq handlers enable them explicitly in the handler to permit > > > other interrupts. > > > > > > > Repeating the same claim does not somehow make it true. If you put > > your claim to the test, you'll see that that interrupts are not > > disabled on m68k when interrupt handlers execute. > > > > The Interrupt Priority Level (IPL) can prevent any given irq handler > > from being re-entered, but an irq with a higher priority level may be > > handled during execution of a lower priority irq handler. > > > > sonic_interrupt() uses an irq lock within an interrupt handler to > > avoid issues relating to this. This kind of locking may be needed in > > the drivers you are trying to patch. Or it might not. Apparently, > > no-one has looked. > > > > According to your discussion with Barry, it seems that m68k is a little > different from other architecture, and this kind of modification of this > patch cannot be applied to m68k. So, could help to point out which > driver belong to m68k architecture in this patch set of SCSI? I can > remove them. > If you would claim that "there are no function changes" in your patches (as above) then the onus is on you to support that claim. I assume that there are some platforms on which your assumptions hold. With regard to drivers for those platforms, you might want to explain why your patches should be applied there, given that the existing code is superior for being more portable. > BTW, sonic_interrupt() is from net driver natsemi, right? It would be > appreciative if only discuss SCSI drivers in this patch set. thanks. > The 'net' subsystem does have some different requirements than the 'scsi' subsystem. But I don't see how that's relevant. Perhaps you can explain it. Thanks.