Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2490326ybd; Thu, 27 Jun 2019 13:19:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCBlUtzfc8PoGTTfWPxR8l8nP5znQ95aeZBTo3/D6pCVdnDMxvS+Ye/ctcnPguQGaQHMH2 X-Received: by 2002:a63:db05:: with SMTP id e5mr5534940pgg.121.1561666759630; Thu, 27 Jun 2019 13:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561666759; cv=none; d=google.com; s=arc-20160816; b=vnO/z30vfOvoIPEg0pL7vvBnpcvQwBJJf3lL6SqckFpoYhrppWM0B5tV3HoHRheyyH dBn7QNLkshZIv1n7+abFE9+S0zkrOKevB4y3jM9wNJl6yNFFF0AHJ8DSyiGeS9ey0HUr s52a/Tr06Y/28hBCGPRqekxa8HrJPnG1bggbcOm+FeaV59K0ArrSrNEY+dYh5qCP8iLE rxBl493jHpOR5i5zclxVqnSJuRFsGcvQ3ScGt9WIIjABhx+Q+aH9YACdgifkbmHrGsZa Tg6hg4lS7owxRTzS+zCirirHWsSVry/5aLmkfn4sjSn4SJlDSLWeQmOUq06n52nH1mGy ZDIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=TriBT0mKKDeogC2dLSoGTzKdPs8k4dCtLUXIs/MOJk0=; b=Ol7quhYF0V9nnyy4b0BNMjb+EfW8IO1pQ6uxbCZQ9Ev0ZGha2/IMQk7/Lco3HoaUdI W59zKTNr8dEq7VBnecVtWtv83eoUMGnNV7lE341EyErVVWbzPkmO4RYCIEscyxYVLSoI 7rh638hKy4T2mv17PgjBXsnONNJ3ckl5T6Rnf+rBD/HyKE2mZF3xIg4ySANrf45WQF2/ N12VEyrDkHigEAYl1M4kWKXJgqz15vV2K1MtrgDsgZwkM1p2lCz3r/o07iKaWWBNVLbx +5m0FqAQDUN6UCFCOt5zn0ld905Muz0Fp0hjnXUiPLkdfDIrapA56/dLreR2w0sW+fso whpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g22si601940pfh.219.2019.06.27.13.19.00; Thu, 27 Jun 2019 13:19:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726508AbfF0URj (ORCPT + 99 others); Thu, 27 Jun 2019 16:17:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37256 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbfF0URj (ORCPT ); Thu, 27 Jun 2019 16:17:39 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E579F308A9E2; Thu, 27 Jun 2019 20:17:31 +0000 (UTC) Received: from ovpn-116-138.phx2.redhat.com (ovpn-116-138.phx2.redhat.com [10.3.116.138]) by smtp.corp.redhat.com (Postfix) with ESMTP id 675255D71B; Thu, 27 Jun 2019 20:17:28 +0000 (UTC) Message-ID: <13761fee4b71cc004ad0d6709875ce917ff28fce.camel@redhat.com> Subject: Re: [RFC] Deadlock via recursive wakeup via RCU with threadirqs From: Scott Wood To: paulmck@linux.ibm.com, Joel Fernandes Cc: Steven Rostedt , Sebastian Andrzej Siewior , rcu , LKML , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan Date: Thu, 27 Jun 2019 15:17:27 -0500 In-Reply-To: <20190627184107.GA26519@linux.ibm.com> References: <20190626135447.y24mvfuid5fifwjc@linutronix.de> <20190626162558.GY26519@linux.ibm.com> <20190627142436.GD215968@google.com> <20190627103455.01014276@gandalf.local.home> <20190627153031.GA249127@google.com> <20190627155506.GU26519@linux.ibm.com> <20190627173831.GW26519@linux.ibm.com> <20190627181638.GA209455@google.com> <20190627184107.GA26519@linux.ibm.com> Organization: Red Hat Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 27 Jun 2019 20:17:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-06-27 at 11:41 -0700, Paul E. McKenney wrote: > On Thu, Jun 27, 2019 at 02:16:38PM -0400, Joel Fernandes wrote: > > > > I think the fix should be to prevent the wake-up not based on whether we > > are > > in hard/soft-interrupt mode but that we are doing the rcu_read_unlock() > > from > > a scheduler path (if we can detect that) > > Or just don't do the wakeup at all, if it comes to that. I don't know > of any way to determine whether rcu_read_unlock() is being called from > the scheduler, but it has been some time since I asked Peter Zijlstra > about that. > > Of course, unconditionally refusing to do the wakeup might not be happy > thing for NO_HZ_FULL kernels that don't implement IRQ work. Couldn't smp_send_reschedule() be used instead? -Scott