Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7073959pxb; Thu, 18 Feb 2021 00:07:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDzvd8MN3bmWEFplN3W41acx5lXkoP6jkMrFOmRC2yz2tOKhQMY6qDa0uk3mduGsO0/3bI X-Received: by 2002:a05:6402:22d0:: with SMTP id dm16mr2875021edb.370.1613635635925; Thu, 18 Feb 2021 00:07:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613635635; cv=none; d=google.com; s=arc-20160816; b=ycJFbAehE5Qggk0ZtcSvR4ss8gFLXZsAJdimBJZXCpPvWF1mCRj4unNSTnXNqELX6l e9bRIf2Y6ZI6Lk5Wex8KCogkOI19Myqlv6peaUJLhPC3WZKnrKvd7zjh/U5HI6QDCaix hAMenQLz55KUTMAjBJ6lZ9dWixO861s4eiSUGOlSFc1TOcZrDP4Vnw/8TsS2GdB4tu4I vZBV4nUsk6DhyOqTHojxQt5Er/vJJ4xmrLbPY1+5aO3tq7BraZicxjg4KSuYZ6ZhnD1g Qu4qE9yWcg0UMLNJ/SuRgQ8qW+cL9VVim2msENyBhHJMknJtmYW8Ka0o4qfOEvoiYwIP xyyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=r5BAl9A4S0hmhft6cEMAKCVE3V9HWfynkHbPGaRP5ZU=; b=KSuH6Es2ldsiXzoNinbzpV8MwOSE49TxmnH2MRw5Bc+TZqnRFPl+OsUEmCQHLs3eKc DKnKtSpJBGQ92iaTiZPE0f9KRE4vI4lN1kG4PgnXKlDoa5iwG3/8tFgbxK34xn24Hez1 9hsoRIVdjDg+A6dFRhsIq1UkXSaopHOqy/6Pzc5oeFCbM2Zc79Sfvx7FLyBfKC9HpeVa HrbEcZMdc07srsJyKJvUOlV/8d8le3B72YnCZSZ6Bg9KLgVUEW18AxAVoLd4Lv5URkH/ WDg4XtC/iQMQzi6Vn8373glK3+oiKqrSYopoNMZOl/RzqziD2lbR+I8riCJjkX09pAe+ djpg== 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 bw14si3139342ejb.201.2021.02.18.00.06.37; Thu, 18 Feb 2021 00:07:15 -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 S230474AbhBRIFF (ORCPT + 99 others); Thu, 18 Feb 2021 03:05:05 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:12553 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231169AbhBRHNp (ORCPT ); Thu, 18 Feb 2021 02:13:45 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Dh5T93t3szMYgj; Thu, 18 Feb 2021 15:10:37 +0800 (CST) Received: from [127.0.0.1] (10.40.192.162) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Thu, 18 Feb 2021 15:12:25 +0800 Subject: Re: [Linuxarm] Re: [PATCH for-next 00/32] spin lock usage optimization for SCSI drivers To: Finn Thain , "Song Bao Hua (Barry Song)" References: <1612697823-8073-1-git-send-email-tanxiaofei@huawei.com> <31cd807d-3d0-ed64-60d-fde32cb3833c@telegraphics.com.au> CC: "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linuxarm@openeuler.org" , From: Xiaofei Tan Message-ID: <7bc39d19-f4cc-8028-11e6-c0e45421a765@huawei.com> Date: Thu, 18 Feb 2021 15:12:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.40.192.162] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Finn, On 2021/2/9 13:06, Finn Thain wrote: > On Tue, 9 Feb 2021, Song Bao Hua (Barry Song) wrote: > >>> -----Original Message----- >>> From: Finn Thain [mailto:fthain@telegraphics.com.au] >>> Sent: Monday, February 8, 2021 8:57 PM >>> To: tanxiaofei >>> Cc: jejb@linux.ibm.com; martin.petersen@oracle.com; >>> linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; >>> linuxarm@openeuler.org >>> Subject: [Linuxarm] Re: [PATCH for-next 00/32] spin lock usage optimization >>> for SCSI drivers >>> >>> 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. BTW, sonic_interrupt() is from net driver natsemi, right? It would be appreciative if only discuss SCSI drivers in this patch set. thanks. > . >