From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752382AbdHPTH2 convert rfc822-to-8bit (ORCPT ); Wed, 16 Aug 2017 15:07:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37950 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbdHPTH0 (ORCPT ); Wed, 16 Aug 2017 15:07:26 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5189278EAF Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=longman@redhat.com Subject: Re: [PATCH] blktrace: Fix potentail deadlock between delete & sysfs ops To: Steven Rostedt Cc: Jens Axboe , Jeff Layton , "J. Bruce Fields" , Ingo Molnar , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <1502384553-14442-1-git-send-email-longman@redhat.com> <20170815191145.3c95680e@gandalf.local.home> <6fa9f560-e1c2-f164-779f-aeefc5aa7017@redhat.com> <20170816141749.6c11d14c@gandalf.local.home> <4841e079-c518-cdff-2fbd-661a9ef36722@redhat.com> <20170816145938.6cc7eaee@gandalf.local.home> From: Waiman Long Organization: Red Hat Message-ID: Date: Wed, 16 Aug 2017 15:07:25 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170816145938.6cc7eaee@gandalf.local.home> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 16 Aug 2017 19:07:26 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/16/2017 02:59 PM, Steven Rostedt wrote: > On Wed, 16 Aug 2017 14:46:42 -0400 > Waiman Long wrote: > > >> I haven't been thinking about RT tasks. You are right that it can be a >> problem in this case. I think I will have to revert back to use >> mutex_lock() if a RT task is running. Though in this case, the lock >> inversion problem will still be there. However, it is highly unlikely >> that a RT task will need to read write the block trace sysfs files. > And it is highly unlikely that the lock inversion will happen. But That is true too:-) > let's not switch one bug with another. And with PREEMPT_RT coming, that > can boost tasks into being RT, it can make the likelihood of RT tasks > running normally non RT tasks higher. > > -- Steve I am thinking about maybe letting a RT task to sleep a tiny amount of time instead of calling schedule(). Hopefully, that will allow a lower-priority task to make forward progress. Cheers, Longman