Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1096768pxb; Thu, 19 Aug 2021 20:24:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn2tuQ0LXgxSOlSVgUijrUvINcWZFBvTKzmKG88M3uRZzhN/Fgor/a11dZVpofchmckBtW X-Received: by 2002:a92:c786:: with SMTP id c6mr11998846ilk.211.1629429891618; Thu, 19 Aug 2021 20:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629429891; cv=none; d=google.com; s=arc-20160816; b=vDfe1pmSDUsSyQeOT693XG/2Rykj8rGtU+wRpZeuQ7iWGzAEhOBjX8MyEKgEjtmjX7 UjC8ut2vZMNGc83Y+kUGM+tf1P9MK1SZrEn0BcmCcnOd9l6y2vrKuNr9D3dLVN79oSmS 68KlYbKl3G+jfEWFEU7LMOa7u61JFDmNpacfsQWpHU6e3ZFyUBDgM9IOVw2bA96BSwIK KY4iL/h21vjHLeZ7ipAcLB2Du8luesrlBxu14NfHIwZx5klcxEuzMfgp6XVCvvkAUm9U Z8B3YelC93Wc87iWh/YJXGTLgDLkiapeOqDmyKYtU8uBZjB36LCf+rITWjj0MfIQTKFt 7pxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=oWdTs6izqiA/pimZyzqfzwAT5R8dcZcICeLEyrt5S/U=; b=d7cY/lTI1Z2oE12xCnBp9d+Z7gEsYg8ZbAMQ7PDpM6T97O5WeDIWtahTo4CS+fFbdd cf43NNVNQlsZpJMJHt2x5qkNJ9mDQdBaDhhOc5dpSmf1ymQPT3ugaUnCdii0oArJUH19 BEu2PPYFSes3Sb4JJCa1UKllNsxdA9fkZ/IFQX1qlnEGfchPnkF3GgOv7E06Kdsrl0uR 0sfzGdXhf4mkI1pzKAnyoUeqpjvDOCR+y8ZfiFLQgRibNDMXGNglEJdi3zfAG2Wvr7H+ Udqnlmfu/qazcX+H+96UQ8FOx/Pt0LRUx0KDp6GzQlKr/a4QCZF7RCHxgu2Tqj3FL3An TyRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HTiZtwsb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si4864992jat.13.2021.08.19.20.24.39; Thu, 19 Aug 2021 20:24:51 -0700 (PDT) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HTiZtwsb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238061AbhHTDYd (ORCPT + 99 others); Thu, 19 Aug 2021 23:24:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30221 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234992AbhHTDYc (ORCPT ); Thu, 19 Aug 2021 23:24:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629429834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oWdTs6izqiA/pimZyzqfzwAT5R8dcZcICeLEyrt5S/U=; b=HTiZtwsbNztzgk9NJeh0duHKxCJdQme6e9UtIz6/T0UC7WIcpQ5In1jBf3IqXN0H953CWJ vffmcfPrK/Mf7VQbmubiTK5S81qQMd1x74HHebXW3nK683bEA2LkxxjIjA/2NrEGTU6T9j AkjlDru1SJoOxzdZGhOqUH+XFHdynsY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-547-hqiP0e4XOxq-BwqdJck-_g-1; Thu, 19 Aug 2021 23:23:53 -0400 X-MC-Unique: hqiP0e4XOxq-BwqdJck-_g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AD375C73A4; Fri, 20 Aug 2021 03:23:44 +0000 (UTC) Received: from ovpn-113-78.phx2.redhat.com (ovpn-113-78.phx2.redhat.com [10.3.113.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19C13189BB; Fri, 20 Aug 2021 03:23:37 +0000 (UTC) Message-ID: <20b9051fe47b7068ed3496bd7f5d417b1af69e3a.camel@redhat.com> Subject: Re: [PATCH] rcutorture: Avoid problematic critical section nesting on RT From: Scott Wood To: Sebastian Andrzej Siewior , Valentin Schneider Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rcu@vger.kernel.org, linux-rt-users@vger.kernel.org, Catalin Marinas , Will Deacon , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Steven Rostedt , Daniel Bristot de Oliveira , "Paul E. McKenney" , Frederic Weisbecker , Josh Triplett , Mathieu Desnoyers , Davidlohr Bueso , Lai Jiangshan , Joel Fernandes , Anshuman Khandual , Vincenzo Frascino , Steven Price , Ard Biesheuvel , Boqun Feng , Mike Galbraith Date: Thu, 19 Aug 2021 22:23:37 -0500 In-Reply-To: <20210817144018.nqssoq475vitrqlv@linutronix.de> References: <20210811201354.1976839-1-valentin.schneider@arm.com> <20210811201354.1976839-2-valentin.schneider@arm.com> <20210817121345.5iyj5epemczn3a52@linutronix.de> <20210817131741.evduh4fw7vyv2dzt@linutronix.de> <20210817144018.nqssoq475vitrqlv@linutronix.de> Organization: Red Hat Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-08-17 at 16:40 +0200, Sebastian Andrzej Siewior wrote: > [bigeasy: remove 'preempt_disable(); local_bh_disable(); preempt_enable(); > local_bh_enable();' from the examples because this works on RT now. ] Does it actually work? If preemption is disabled during local_bh_disable, softirq_ctrl.lock won't be taken. If you then get preempted between the preempt_enable() and the local_bh_enable(), and another task tries to do local_bh_disable(), won't it successfully get softirq_ctrl.lock, add to softirq_ctrl.cnt, and proceed right into the critical section? Or am I missing something? -Scott