Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp273413imn; Mon, 25 Jul 2022 16:12:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ucao3nu1fwBlFETOr/1Q7zFF4tIiqQSr+DlOj7JfDWwBSa4eQqNIy6CzjmAkwMDLxIpfU6 X-Received: by 2002:a17:903:1245:b0:16c:ece7:f6f1 with SMTP id u5-20020a170903124500b0016cece7f6f1mr14709768plh.169.1658790742415; Mon, 25 Jul 2022 16:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658790742; cv=none; d=google.com; s=arc-20160816; b=iDJ7FLf57GBPFtKX+r1ryBirMZL8z9cm+rwUOtCFRJZ5RVPB92x4wsxH+hs0ZsqT6A IwqawWzo9nMMc7NMgEqQGnxGMWWIxjUpT+qNCB5al/ht14gWSXhgM3hWOj4Lpnl7p7kI QFoEtkBiOHW+y1T34qIVR9CcXnObMUgD5UffEPK2YtpsoXnLaPq+C09+E37UpRJHQF7B VoJE/AViRlbftu2jZhup6j33IhsVwo4CCOm0KZaeUpQmd+JuX6hTN/w+urlqMXwYi83m rBOEzNHN7NWXMQqfVuLAD157aHwlbZBs2DIM4y7Lyadr9M+V7kDuJlpE/nvOvv59K2kf Cv0w== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=YyhxX2mWLvi9NimhQGcKzGIHUcpD9uFByKnTgfQXT2w=; b=leuAtLvMcSA0lQsX+3M3BGXdXywPL9ILfWu5rIZf6aZ8xkcP3zyPV7sP3IHblpGHMI z63tJAHKz52KE3+9bXoVCA1efTr+GgGsyCsjMho0qHs+tJkw43Z8Kc8Q2lnL3BB6Np9/ nKBWek2FhhbjC2NlgJGRUJCHvk+b8x5kaS4Oufzhi9ct+t1W/pEbkzaaJN+EJdXEjaY/ YsAjx8AnAs785hM7ElWMzeSLSlVlUpcchYR/3l7laBTr35b27hATBtq5lLAT1gQlQsXL pmSSlsk0i7P0sGn8Pfj+14LEYN8/VU+kblwFwlAgZH6znALpvgLBtQmS7jGbO0qYTz/9 UDOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=PGkpTuxY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n3-20020a170902f60300b0016d28b3f3e8si15433747plg.89.2022.07.25.16.12.07; Mon, 25 Jul 2022 16:12:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=PGkpTuxY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232718AbiGYWGX (ORCPT + 99 others); Mon, 25 Jul 2022 18:06:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbiGYWGW (ORCPT ); Mon, 25 Jul 2022 18:06:22 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 489F0222AA; Mon, 25 Jul 2022 15:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YyhxX2mWLvi9NimhQGcKzGIHUcpD9uFByKnTgfQXT2w=; b=PGkpTuxYoVATcBmmo5QpTR9OdU CwxiCUUyg+Y43WZFKPZI8tVhTGlbReOvxwRy9vN5xlFY3Picc9q02QVGon0mk2qr+gc0H6DI1xkdA Ocae0c8zKyVjxHiL0K7bl4oQZhe8iJrhJtaQD9dZsgzJVrcCJZAzsov/XHxJWKbmbo5ftSD95pWKz UFCnlx6Icb4+P+rIPF6DDujCPBhMW2lOCenPqvqjXpVKjdwjx9mBL17sU/cCfl+FmUrx7l2Dspgvf whmOYidPV6T/it/Bz3pnx0XUGVjPveeRJzlInsHK3oB41Rw1lJRpzg9VZc6aVCj990v9DlchEvxp+ pb2gaO3A==; Received: from [177.51.67.168] (helo=[192.168.43.24]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1oG6D1-006U4U-LN; Tue, 26 Jul 2022 00:05:52 +0200 Message-ID: Date: Mon, 25 Jul 2022 19:05:18 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2 11/13] video/hyperv_fb: Avoid taking busy spinlock on panic path Content-Language: en-US To: "Michael Kelley (LINUX)" , "akpm@linux-foundation.org" , "bhe@redhat.com" , "pmladek@suse.com" , "kexec@lists.infradead.org" Cc: "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , "x86@kernel.org" , "kernel-dev@igalia.com" , "kernel@gpiccoli.net" , "halves@canonical.com" , "fabiomirmar@gmail.com" , "alejandro.j.jimenez@oracle.com" , "andriy.shevchenko@linux.intel.com" , "arnd@arndb.de" , "bp@alien8.de" , "corbet@lwn.net" , "d.hatayama@jp.fujitsu.com" , "dave.hansen@linux.intel.com" , "dyoung@redhat.com" , "feng.tang@intel.com" , "gregkh@linuxfoundation.org" , "hidehiro.kawai.ez@hitachi.com" , "jgross@suse.com" , "john.ogness@linutronix.de" , "keescook@chromium.org" , "luto@kernel.org" , "mhiramat@kernel.org" , "mingo@redhat.com" , "paulmck@kernel.org" , "peterz@infradead.org" , "rostedt@goodmis.org" , "senozhatsky@chromium.org" , "stern@rowland.harvard.edu" , "tglx@linutronix.de" , "vgoyal@redhat.com" , vkuznets , "will@kernel.org" , Andrea Parri , Dexuan Cui , Haiyang Zhang , KY Srinivasan , Stephen Hemminger , Tianyu Lan , Wei Liu References: <20220719195325.402745-1-gpiccoli@igalia.com> <20220719195325.402745-12-gpiccoli@igalia.com> From: "Guilherme G. Piccoli" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 25/07/2022 15:09, Michael Kelley (LINUX) wrote: > [...] >> +bool hv_ringbuffer_spinlock_busy(struct vmbus_channel *channel) >> +{ >> + struct hv_ring_buffer_info *rinfo = &channel->outbound; >> + >> + if (spin_is_locked(&rinfo->ring_lock)) >> + return true; >> + >> + return false; > > Could simplify the code as just: > > return spin_is_locked(&rinfo->ring_lock); > Sure, makes sense! Thanks for the suggestion, I'll do that for V3. Cheers, Guilherme