From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Mason Subject: Re: [PATCH RFC] fs/aio: fix sleeping while TASK_INTERRUPTIBLE Date: Tue, 23 Dec 2014 13:55:26 -0500 Message-ID: <1419360926.13012.12@mail.thefacebook.com> References: <20141223001619.GA26385@ret.masoncoding.com> <20141223184328.GB17185@kvack.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Cc: , , Peter Zijlstra To: Benjamin LaHaise Return-path: In-Reply-To: <20141223184328.GB17185@kvack.org> Sender: owner-linux-aio@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Dec 23, 2014 at 1:43 PM, Benjamin LaHaise wrote: > On Mon, Dec 22, 2014 at 07:16:25PM -0500, Chris Mason wrote: >> The 3.19 merge window brought in a great new warning to catch >> someone >> calling might_sleep with their state != TASK_RUNNING. The idea was >> to >> find buggy code locking mutexes after calling prepare_to_wait(), >> kind >> of like this: > ... >> This has been lightly tested and hasn't been benchmarked, so RFC for >> now. > > This was on my list of things to look at today. > > I'm not at all happy with this particular patch. It looks like this > issue > was introduced back in 3.10 by Kent's big overhaul of things. The > main > benefit Kent's changes achieved stems from holding ring_lock across > fetching > multiple events rather than taking the spin lock for every event. I'm > going to see if I can come up with a simpler way of fixing this. Works for me, the patch is mostly a (somewhat commented) list of all the places we're currently doing it wrong. -chris -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: aart@kvack.org