From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262145AbVFUQRT (ORCPT ); Tue, 21 Jun 2005 12:17:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262164AbVFUQQt (ORCPT ); Tue, 21 Jun 2005 12:16:49 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:59349 "EHLO e2.ny.us.ibm.com") by vger.kernel.org with ESMTP id S262161AbVFUQPb (ORCPT ); Tue, 21 Jun 2005 12:15:31 -0400 Date: Tue, 21 Jun 2005 09:14:52 -0700 From: Nishanth Aravamudan To: "Maciej W. Rozycki" Cc: Domen Puncer , axboe@suse.de, linux-kernel@vger.kernel.org Subject: Re: [patch 04/12] block/xd: replace schedule_timeout() with msleep() Message-ID: <20050621161452.GA4175@us.ibm.com> References: <20050620215133.675387000@nd47.coderock.org> <20050621132100.GL3906@nd47.coderock.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux 2.6.12-rc5 (i686) User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On 21.06.2005 [14:53:49 +0100], Maciej W. Rozycki wrote: > On Tue, 21 Jun 2005, Domen Puncer wrote: > > > mdelay - busy loop > > msleep - schedule > > Right -- that's my mistake. But what's the point of the change in the > first place anyway? The original code is correct. Please refer to the comment in the description: schedule_timeout(1) is ambiguous in older/unchanged code since 2.4, as it indicated a 10 millisecond sleep then. Now, in 2.6, it indicates a 1 millisecond sleep (HZ==1000). I am trying to prevent issues like this coming up in the future (CONFIG_HZ has hit -mm, e.g.) and msleep() is a good way to do so. If you are trying to sleep for the shortest amount of time possible (a tick), though, then the code is fine, I guess. A comment may be useful, though. Thanks, Nish