Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp844834pxb; Fri, 22 Apr 2022 12:25:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAbRsaPf/yLemA2rbB+DZoUNFWw2sssZfrc49en4TsSxeu4TedmEnjDZbImcG/EA/a0pau X-Received: by 2002:a17:90b:1d8f:b0:1d2:e15a:de8 with SMTP id pf15-20020a17090b1d8f00b001d2e15a0de8mr7061843pjb.139.1650655517972; Fri, 22 Apr 2022 12:25:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650655517; cv=none; d=google.com; s=arc-20160816; b=N+BwYvOWaMZzvCB7zMKLrTaumZmwGaBXf/j1iD8gGq/JYiEV4mli5hPmvYDuAipnn4 hw6MWQ3znnREiqWO/Sjn+X8E0Iq8beIJb1uAA/jvIOQeluj/vCCW4Z9JYgF8zWGjfthC GbQhsaJUAQylqnePvkjAZDrb0EV/rpyY3KDxhOE/3LUWJT2L/KCIn1QDTL7N8rCOSXps GIp2sJCSBuQSZ0JH7CiAHAMa398BaoN8yAv8YKViDlFJJmBgUAUnB4Y9TgFPtkOVmJNJ UN9nxvkaDBmsh0DkAoY2Ey+03Y4bw6zzbmfi4c04iQQ47jmLx2H5zu6ONENQ7794wsWF 84fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4z0DG/HTGjm0nnHIhD5v7rm7s7fXaigHD/5btxNfFCk=; b=FBd1FPPa+wah3MI4eXDWGct71FSc0tR+AOrt1F+g7gQBVCWX3kec+jm69ONYeFkQgj 5Kj3hd3zux7pEAqMuxpMsCVZl/F4Q8T6Dwc4/wRAKdnTei2g1Zx6kZm24ROvj1NB02Vf lhZjyedrBQQmHW/dpJsA3OxvfP+7BGIBeTJ1IIJsUWiBhz2HVbVR+xJUOAtgW+QFCekk w/5Wup2JOCkGsp9Lv21OGgK+2kVwwUGQFfkh/BbrM7lVnndag2t8xOMoM1h4VxSzJ5VJ wdGgPMSKJTI+A0l7eQrUjZSIUhxl6JNdjDH4ydzP/sMyMV5j1kSfmWgsCQeLdCu9zbyh I9vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KnDr5Ttx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y2-20020a17090a86c200b001cb8b9109e9si8077114pjv.45.2022.04.22.12.25.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:25:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KnDr5Ttx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A9C8511F94D; Fri, 22 Apr 2022 11:37:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1446301AbiDVJ7j (ORCPT + 99 others); Fri, 22 Apr 2022 05:59:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1446285AbiDVJ7i (ORCPT ); Fri, 22 Apr 2022 05:59:38 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24CCE53B6C; Fri, 22 Apr 2022 02:56:45 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id k14so6994112pga.0; Fri, 22 Apr 2022 02:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4z0DG/HTGjm0nnHIhD5v7rm7s7fXaigHD/5btxNfFCk=; b=KnDr5TtxaHLKB/6Qy7Jus6MHdsRi3aLqIG52gWYCLtsuQRIqYzvx6Btesrkh3ECEup wGS/yAONCHvSgQ1oTRV8kD3YvcmnArQdgDHvS1dolRqJQUgOWk7Wh4TbgoyFgDcuAsiR Ngms1Go/S44idIyo9RpPsk+o/nKEx1glBalAJx1FKoJtlMB0cC4XZ2MBSPeIPNr90EHI Uorxsu0oEyBLI2/tXqHBZizkgSjM2JJ2vFtvjy6Ww/o+p8xT3bBI8uTe7Gkto/93uCxZ Mmi94sEXjiuNrwen4hbeGYAxRcTdPHQ8EiMAwVShwSfN4R4D4yXremQvuHHAgIiZt+FX ohoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4z0DG/HTGjm0nnHIhD5v7rm7s7fXaigHD/5btxNfFCk=; b=aM/eASQ9z3SK1uFdh09kNSgbFyuNaF8kD80S3DqPOBNfDJ9ogQsfTo2lIOxLBTVU9B wBB84lLDM6FabChKBAhQ54beAMUFe1YgUi4i1C+oORuUf6+QlDRaoA8GmnrlA1gPzqcF jMhFqdOwpt+IVwOXaV/hAtXVZKx+dIbV1ey2Sqr0W6K+AKH0uzukefh9YgXKo6PcFIO1 6MwjuFLgEKM3CEf3BJWaQAmbcNy+bh8vnl0dkeEL4rQ7MWhOty30yjWYy3XmuShBTY3O k/U08y1uu2QYXyRVgzw84zla1RaASLmYTQiuiKEW2++5pYY0ad7r9CNpCMgXNODcIs38 It/g== X-Gm-Message-State: AOAM533Jryq8rVbjKz+uwpkSIJVvLTUmxDPRr4czCrLj/Ulq2Qh2XLsD bD6+9IDWivzfEH5GhcVYxQ== X-Received: by 2002:a63:780f:0:b0:386:5d6f:2153 with SMTP id t15-20020a63780f000000b003865d6f2153mr3150837pgc.555.1650621404650; Fri, 22 Apr 2022 02:56:44 -0700 (PDT) Received: from piliu.users.ipa.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id c139-20020a624e91000000b005060cdff4ffsm1995538pfb.129.2022.04.22.02.56.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 02:56:44 -0700 (PDT) Date: Fri, 22 Apr 2022 17:56:37 +0800 From: Pingfan Liu To: Heiko Carstens Cc: linux-s390@vger.kernel.org, Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/9] s390/irq: utilize RCU instead of irq_lock_sparse() in show_msi_interrupt() Message-ID: References: <20220420140521.45361-1-kernelfans@gmail.com> <20220420140521.45361-5-kernelfans@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 21, 2022 at 01:42:59PM +0200, Heiko Carstens wrote: > On Thu, Apr 21, 2022 at 11:36:17AM +0800, Pingfan Liu wrote: > > Oops. You are right. What about using rcu_read_lock() directly? > > > > > > diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c > > index 3033f616e256..45393919fe61 100644 > > --- a/arch/s390/kernel/irq.c > > +++ b/arch/s390/kernel/irq.c > > @@ -205,7 +205,7 @@ static void show_msi_interrupt(struct seq_file *p, int irq) > > unsigned long flags; > > int cpu; > > > > - irq_lock_sparse(); > > + rcu_read_lock(); > > desc = irq_to_desc(irq); > > if (!desc) > > goto out; > > @@ -224,7 +224,7 @@ static void show_msi_interrupt(struct seq_file *p, int irq) > > seq_putc(p, '\n'); > > raw_spin_unlock_irqrestore(&desc->lock, flags); > > out: > > - irq_unlock_sparse(); > > + rcu_read_unlock(); > > That looks like it should work. Please resend and also add a reference > to commit 74bdf7815dfb ("genirq: Speedup show_interrupts()") which > explains why this works. Thanks for your review. I will follow up with V2. Regards, Pingfan