Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4319661ybl; Mon, 26 Aug 2019 08:42:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8bpfm/sq5jJ6N6uzCUaJ3isXgB5IqLEzTVwhyu2bnFcej6Q+g4BI+b0r7+gdFU9TqLrjx X-Received: by 2002:a17:90a:9f4b:: with SMTP id q11mr20229774pjv.105.1566834130223; Mon, 26 Aug 2019 08:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566834130; cv=none; d=google.com; s=arc-20160816; b=g4TraqQ50jvLQffWIdblKaBocWuSI4/v3a1iHxm/g/mmpW80PjsIBbxs+GWfwCfoFt e6I0B3GQSMYE05SxLIPh9zQlCBzlw964MdigYVNDB0BCzD5lnKrD08lPcE9n/WGoZtNF 9SIMvU6qnNnJKLMH3xqMuiqQ86rIVmPJgfUELWF+Pzy47KivMfsWE+gqUn77UB5XTSRa Sqtev2OFA02+n+/97RVSJUindHz0OdUgATNGzx4pjvpaEuNpU5AgdkNGhSJ6MozJwR0p j7mvBiJ8EUZg6t+OfRQhb2EyKQL1Mi+Ow/i9U5D8l0pUZQMcgukV/NlQI6AnMrNWYVtG F2kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Yv5oVuEJrAHDEQMqAxaBIA3hcG5ba6/QMqAhY/egZD0=; b=oaaH2z0JIKcOpeSGigIeN+Z4vGIAzZpDs/7QYWxSsKkeRFfbKAZQHMtEWUth3XtFVv DtUibX5qsVa0jotJ7EqOVYUFUklZ7/CbX1bjcW/PCdIDCMf8qrVUB+ZFmZXf81bpXbM8 5lK6fgAV+tXgS71qdmlyblqD+hUZzyuMPCX/jQp0BVgv4ymHDjdEGnJCuzYougRd/QJh LRXYPz18whq6VbaFIaZRM86HJ0NmhbEuSJ4gtXXe1MToDJgelKemwYG1o7d38tEHojcD gsxK32bB6i1MCwwlBfblPSphcyAe6j0dgGyZnR3OIkNpDZ36VnZd5uGVs56jpr6eLY1T 2Yqw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si10759844pfq.88.2019.08.26.08.41.54; Mon, 26 Aug 2019 08:42:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732039AbfHZPZ0 (ORCPT + 99 others); Mon, 26 Aug 2019 11:25:26 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:40486 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727658AbfHZPZ0 (ORCPT ); Mon, 26 Aug 2019 11:25:26 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1i2Grz-0007W4-Hf; Mon, 26 Aug 2019 17:25:23 +0200 Date: Mon, 26 Aug 2019 17:25:23 +0200 From: Sebastian Andrzej Siewior To: Joel Fernandes Cc: Scott Wood , linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org, "Paul E . McKenney" , Thomas Gleixner , Peter Zijlstra , Juri Lelli , Clark Williams Subject: Re: [PATCH RT v2 2/3] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep Message-ID: <20190826152523.dcjbsgyyir4zjdol@linutronix.de> References: <20190821231906.4224-1-swood@redhat.com> <20190821231906.4224-3-swood@redhat.com> <20190823162024.47t7br6ecfclzgkw@linutronix.de> <433936e4c720e6b81f9b297fefaa592fd8a961ad.camel@redhat.com> <20190824031014.GB2731@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190824031014.GB2731@google.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-08-23 23:10:14 [-0400], Joel Fernandes wrote: > On Fri, Aug 23, 2019 at 02:28:46PM -0500, Scott Wood wrote: > > On Fri, 2019-08-23 at 18:20 +0200, Sebastian Andrzej Siewior wrote: > > > > > > this looks like an ugly hack. This sleeping_lock_inc() is used where we > > > actually hold a sleeping lock and schedule() which is okay. But this > > > would mean we hold a RCU lock and schedule() anyway. Is that okay? > > > > Perhaps the name should be changed, but the concept is the same -- RT- > > specific sleeping which should be considered involuntary for the purpose of > > debug checks. Voluntary sleeping is not allowed in an RCU critical section > > because it will break the critical section on certain flavors of RCU, but > > that doesn't apply to the flavor used on RT. Sleeping for a long time in an > > RCU critical section would also be a bad thing, but that also doesn't apply > > here. > > I think the name should definitely be changed. At best, it is super confusing to > call it "sleeping_lock" for this scenario. In fact here, you are not even > blocking on a lock. > > Maybe "sleeping_allowed" or some such. The mechanism that is used here may change in future. I just wanted to make sure that from RCU's side it is okay to schedule here. > thanks, > > - Joel Sebastian