From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1HtuMl-0000pm-4F for user-mode-linux-devel@lists.sourceforge.net; Thu, 31 May 2007 16:47:39 -0700 Received: from [198.99.130.12] (helo=saraswathi.solana.com) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1HtuMj-0006mK-M9 for user-mode-linux-devel@lists.sourceforge.net; Thu, 31 May 2007 16:47:39 -0700 Date: Thu, 31 May 2007 19:39:46 -0400 From: Jeff Dike Message-ID: <20070531233946.GA12493@c2.user-mode-linux.org> References: <20070531181923.GA9904@c2.user-mode-linux.org> <20070531220716.GL5488@mami.zabbo.net> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: <20070531220716.GL5488@mami.zabbo.net> Subject: Re: [uml-devel] [PATCH] Syslets - Fix cachemiss_thread return value List-Id: The user-mode Linux development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: user-mode-linux-devel-bounces@lists.sourceforge.net Errors-To: user-mode-linux-devel-bounces@lists.sourceforge.net To: Zach Brown Cc: Ingo Molnar , LKML , uml-devel On Thu, May 31, 2007 at 03:07:16PM -0700, Zach Brown wrote: > Can you explain what motivated you to send out this patch? > > It used to return 0. It was changed because, unlike the syslet > syscalls, sys_io_submit() doesn't have a simple 0 value to indicate > success. The current implementation wants to return the number of iocbs > that were processed, including the one which blocked, from the cachemiss > thread. So before calling into an operation it sets task_ret_ret() so > that the cachemiss thread can return it if it takes over. > task_ret_reg() is holding a return value that is being returned by the > cachemiss thread on behalf of a sys_io_submit() which blocked. > > When I made the change I didn't really audit its effect on the other > paths. I suppose it's time to do that, and you could help by telling me > if you saw something bad happen :). The bad thing was sys_async_exec returning -NOSYS every time a new cachemiss thread was created. Without this patch, you'll see sys_async_exec failures with either of the demos I sent out. Dunno about the existing ones, but I bet they do the same. Jeff -- Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760708AbXEaXsR (ORCPT ); Thu, 31 May 2007 19:48:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755775AbXEaXsE (ORCPT ); Thu, 31 May 2007 19:48:04 -0400 Received: from [198.99.130.12] ([198.99.130.12]:34907 "EHLO saraswathi.solana.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755876AbXEaXsB (ORCPT ); Thu, 31 May 2007 19:48:01 -0400 Date: Thu, 31 May 2007 19:39:46 -0400 From: Jeff Dike To: Zach Brown Cc: Ingo Molnar , LKML , uml-devel Subject: Re: [PATCH] Syslets - Fix cachemiss_thread return value Message-ID: <20070531233946.GA12493@c2.user-mode-linux.org> References: <20070531181923.GA9904@c2.user-mode-linux.org> <20070531220716.GL5488@mami.zabbo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070531220716.GL5488@mami.zabbo.net> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 31, 2007 at 03:07:16PM -0700, Zach Brown wrote: > Can you explain what motivated you to send out this patch? > > It used to return 0. It was changed because, unlike the syslet > syscalls, sys_io_submit() doesn't have a simple 0 value to indicate > success. The current implementation wants to return the number of iocbs > that were processed, including the one which blocked, from the cachemiss > thread. So before calling into an operation it sets task_ret_ret() so > that the cachemiss thread can return it if it takes over. > task_ret_reg() is holding a return value that is being returned by the > cachemiss thread on behalf of a sys_io_submit() which blocked. > > When I made the change I didn't really audit its effect on the other > paths. I suppose it's time to do that, and you could help by telling me > if you saw something bad happen :). The bad thing was sys_async_exec returning -NOSYS every time a new cachemiss thread was created. Without this patch, you'll see sys_async_exec failures with either of the demos I sent out. Dunno about the existing ones, but I bet they do the same. Jeff -- Work email - jdike at linux dot intel dot com