Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3043614pxb; Tue, 12 Jan 2021 05:07:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJ0DUXTVRcLxxDxYTSPbGpw26NoH99LT7hLbUTk92m7QdZIIsQrwH8QrS6TVDQ+SLKro9z X-Received: by 2002:a17:907:3f29:: with SMTP id hq41mr2153855ejc.227.1610456827834; Tue, 12 Jan 2021 05:07:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610456827; cv=none; d=google.com; s=arc-20160816; b=iPCHVSAfypYC2SjbmbpCRSWawv4HHOvNbuPPtoB3KxZZKjLCjdbgVuB8ijXSVGihBH Ug2l38eCdbIspJJ9Tw73b89lifU4D4xaumDfMN9N9uwIen/rLZ3g8JzYdnTdfzKdVapi sCG8emmsBOQ1NQ6H8V9QRTrWHDUQr72Bf9ArKsJCZXlcHKQEZRgGri2vqPhxSH3OzrsD 6b1+LTSEvnYcaZyWJp6rvjoislXOLLeHR+fKwDKlZXh+Rg04Eyqxy+IyHsHtM1vuW4kT MgGbMQBSa9l2ipoyuxUef6EdziBBrWMVa2z0PRp+l963Qb5on6AquavRnUgJm6+fTFz+ srdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=HgZrXdoXT+GUL8tzm/qwz9Gt2XQuaGvTjzUzYK9CAMQ=; b=G9Gt7rrisoDS4k86hIdBdSvrNKmWR2+gCQLzx+a7tnT1G1aB3a7/r8TeKHCCDq1jiq o/dwWIoPZ1emkMm7zJcDOxSwY3msuwH5kZyvXUPnTw339Wg1ASAJT6V+l2EchVxO5uly dgWDNIo7RTBZMzdign03BgNDsFQOGOch0fK2CSJdsFP/lwsGW06spLbL3KFMlJD6QyjV EyxDqjOWuF/j80s3L4vUT+jZp8pu7QtYDIGVjAF44snLdbH+Y8qKNHKR4ftq/8JJHsWM BrSBKgeS8BIp69rzAXTX8tTJuIFXjVcUeD4p+Ggr0A+cffzwhPOVoBkPea+/cEynOXnQ QNcw== 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 b10si1026447ejj.171.2021.01.12.05.06.42; Tue, 12 Jan 2021 05:07:07 -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 S1731755AbhALLzm (ORCPT + 99 others); Tue, 12 Jan 2021 06:55:42 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:2318 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728310AbhALLzl (ORCPT ); Tue, 12 Jan 2021 06:55:41 -0500 Received: from fraeml736-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4DFTRw17Nzz67ZPZ; Tue, 12 Jan 2021 19:51:08 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml736-chm.china.huawei.com (10.206.15.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 12 Jan 2021 12:54:59 +0100 Received: from [10.210.171.61] (10.210.171.61) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 12 Jan 2021 11:54:57 +0000 Subject: Re: [PATCH v2 00/19] scsi: libsas: Remove in_interrupt() check To: "Ahmed S. Darwish" , "James E.J. Bottomley" , "Martin K. Petersen" , Jason Yan , Daniel Wagner , "Artur Paszkiewicz" , Jack Wang CC: , , LKML , Thomas Gleixner , "Sebastian A. Siewior" References: <20210112110647.627783-1-a.darwish@linutronix.de> From: John Garry Message-ID: <8683f401-29b6-4067-af51-7b518ad3a10f@huawei.com> Date: Tue, 12 Jan 2021 11:53:50 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20210112110647.627783-1-a.darwish@linutronix.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.210.171.61] X-ClientProxiedBy: lhreml744-chm.china.huawei.com (10.201.108.194) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/01/2021 11:06, Ahmed S. Darwish wrote: > Hi, > > Changelog v2 > ------------ > > - Rebase on top of v5.11-rc3 > > - Rebase on top of John's patch "scsi: libsas and users: Remove notifier > indirection", as it affects every other patch. Include it in this > series (patch #2). > > - Introduce patches #13 => #19, which modify call sites back to use the > original libsas notifier function names without _gfp() suffix. > > - Collect r-b tags > > v1 Submission > ------------- > > https://lkml.kernel.org/r/20201218204354.586951-1-a.darwish@linutronix.de > > Cover letter > ------------ > > In the discussion about preempt count consistency across kernel > configurations: > > https://lkml.kernel.org/r/20200914204209.256266093@linutronix.de > > it was concluded that the usage of in_interrupt() and related context > checks should be removed from non-core code. > > This includes memory allocation mode decisions (GFP_*). In the long run, > usage of in_interrupt() and its siblings should be banned from driver > code completely. > > This series addresses SCSI libsas. Basically, the function: > > => drivers/scsi/libsas/sas_init.c: > struct asd_sas_event *sas_alloc_event(struct asd_sas_phy *phy) > { > ... > gfp_t flags = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL; > event = kmem_cache_zalloc(sas_event_cache, flags); > ... > } > > is transformed so that callers explicitly pass the gfp_t memory > allocation flags. Affected libsas clients are modified accordingly. > > Patches #1, #2 => #7 have "Fixes: " tags and address bugs the were > noticed during the context analysis. > > Thanks! > > 8<-------------- > > Ahmed S. Darwish (18): > Documentation: scsi: libsas: Remove notify_ha_event() > scsi: libsas: Introduce a _gfp() variant of event notifiers > scsi: mvsas: Pass gfp_t flags to libsas event notifiers > scsi: isci: port: link down: Pass gfp_t flags > scsi: isci: port: link up: Pass gfp_t flags > scsi: isci: port: broadcast change: Pass gfp_t flags > scsi: libsas: Pass gfp_t flags to event notifiers > scsi: pm80xx: Pass gfp_t flags to libsas event notifiers > scsi: aic94xx: Pass gfp_t flags to libsas event notifiers > scsi: hisi_sas: Pass gfp_t flags to libsas event notifiers > scsi: libsas: event notifiers API: Add gfp_t flags parameter > scsi: hisi_sas: Switch back to original libsas event notifiers > scsi: aic94xx: Switch back to original libsas event notifiers > scsi: pm80xx: Switch back to original libsas event notifiers > scsi: libsas: Switch back to original event notifiers API > scsi: isci: Switch back to original libsas event notifiers > scsi: mvsas: Switch back to original libsas event notifiers > scsi: libsas: Remove temporarily-added _gfp() API variants I'll give this a spin today and help review also then. There's 18 patches here - it would be very convenient if they were on a public branch :) Cheers, John > > John Garry (1): > scsi: libsas and users: Remove notifier indirection > > Documentation/scsi/libsas.rst | 5 ++-- > drivers/scsi/aic94xx/aic94xx_scb.c | 20 ++++++------- > drivers/scsi/hisi_sas/hisi_sas.h | 3 +- > drivers/scsi/hisi_sas/hisi_sas_main.c | 29 +++++++++---------- > drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 6 ++-- > drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 6 ++-- > drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 6 ++-- > drivers/scsi/isci/port.c | 11 +++---- > drivers/scsi/libsas/sas_event.c | 27 ++++++++--------- > drivers/scsi/libsas/sas_init.c | 17 ++++------- > drivers/scsi/libsas/sas_internal.h | 5 ++-- > drivers/scsi/mvsas/mv_sas.c | 24 +++++++--------- > drivers/scsi/pm8001/pm8001_hwi.c | 40 ++++++++++++-------------- > drivers/scsi/pm8001/pm8001_sas.c | 12 +++----- > drivers/scsi/pm8001/pm80xx_hwi.c | 37 +++++++++++------------- > include/scsi/libsas.h | 9 +++--- > 16 files changed, 115 insertions(+), 142 deletions(-) > > base-commit: 7c53f6b671f4aba70ff15e1b05148b10d58c2837 > -- > 2.30.0 > . >