From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753328Ab1H3Wpl (ORCPT ); Tue, 30 Aug 2011 18:45:41 -0400 Received: from smtp-out.google.com ([216.239.44.51]:34003 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752594Ab1H3Wpi convert rfc822-to-8bit (ORCPT ); Tue, 30 Aug 2011 18:45:38 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=dkim-signature:mime-version:in-reply-to:references:date: message-id:subject:from:to:cc:content-type: content-transfer-encoding:x-system-of-record; b=fJpFi7bRlqNFjBRlkmYqmZqzWVErn80ItjW6znnVeJ3HBtqo63fZINlz3zZCQFINI CSsCGCnA9gFp1GZo0xUWA== MIME-Version: 1.0 In-Reply-To: <20110830154157.d802d097.akpm@linux-foundation.org> References: <4E5D5817.6040704@kernel.dk> <4E5D64E8.7000102@kernel.dk> <20110830154157.d802d097.akpm@linux-foundation.org> Date: Tue, 30 Aug 2011 15:45:35 -0700 Message-ID: Subject: Re: Approaches to making io_submit not block From: Daniel Ehrenberg To: Andrew Morton Cc: Jens Axboe , Jeff Moyer , linux-kernel@vger.kernel.org, linux-aio@kvack.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 30, 2011 at 3:41 PM, Andrew Morton wrote: > On Tue, 30 Aug 2011 16:32:08 -0600 > Jens Axboe wrote: > >> On 2011-08-30 16:19, Daniel Ehrenberg wrote: >> > On Tue, Aug 30, 2011 at 2:37 PM, Jens Axboe wrote: >> >> On 2011-08-30 15:30, Jeff Moyer wrote: >> >>> Daniel Ehrenberg writes: >> >>> >> >>>> Hi Jens, Jeff, >> >>>> >> >>>> I just sent a letter to LKML wondering about changes to io_submit that >> >>>> I'm thinking of working on. Based on your past contributions to this >> >>>> area, I'd really like to know what you think of this plan--how well it >> >>>> matches with the existing design, the potential for inclusion in >> >>>> upstream Linux, if you see problems. >> >>> >> >>> Hi, Dan, >> >>> >> >>> Thanks for taking the time to make AIO better!  There is a mailing list >> >>> for aio discussions: linux-aio@kvack.org, so please CC that in the >> >>> future (I don't read lkml anymore). >> >>> >> >>> Right now I'm a bit inundated, so I can't give this a proper review. >> >>> I should be able to free up some time in the next two weeks, though. >> >>> >> >>> In the mean time, you can google for suparna's retry-based aio patches. >> >>> Specifically, take a look at how she used prepare_to_wait/finish_wait. >> >>> If you haven't done any empirical tests to see where io_submit blocks, >> >>> there is a sample systemtap script for that: >> >>>   http://sourceware.org/systemtap/examples/io/io_submit.stp >> >>> Other attempts at non-blocking aio were off the deep end: fibrils and >> >>> syslets.  Fibrils didn't go anywhere because Ingo didn't like them (for >> >>> good reason, they essentially introduced another scheduling layer). >> >>> Syslets didn't go anywhere b/c they were insane (returned to the >> >>> user-space process with a different PID, among other things!). >> >>> >> >>> If you do go forward in the meantime, you can likely use EIOCBRETRY >> >>> instead of EAGAIN. >> >>> >> >>> I hope that helps! >> >> >> >> FWIW, I updated the buffered AIO retry patches some time after Suparna >> >> droped them. By the date stamp in my branch, they are now 23 months >> >> old... Anyway, at least it's more recent, you can find them here: >> >> >> >> http://git.kernel.dk/?p=linux-block.git;a=shortlog;h=refs/heads/aio-buffered >> >> >> >> -- >> >> Jens Axboe >> >> >> >> >> > Thanks! Do you know why the patches weren't merged? I can't find much >> > discussion about them. >> >> Not quite sure, and after working on them and fixing thing up, I don't >> even think they are that complex or intrusive (which I think otherwise >> would've been the main objection). Andrew may know/remember. > > Boy, that was a long time ago.  I was always unhappy with the patches > because of the amount of additional code/complexity they added. > > Then the great syslets/threadlets design session happened and it was > expected that such a facility would make special async handling for AIO > unnecessary.  Then syslets/threadlets didn't happen. Do you think we could accomplish the goals with less additional code/complexity? It looks like the latest version of the patch set wasn't so invasive. If syslets/threadlets aren't happening, should these patches be reconsidered for inclusion in the kernel? Thanks, Dan