Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 1 Nov 2002 22:38:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 1 Nov 2002 22:38:43 -0500 Received: from 3-090.ctame701-1.telepar.net.br ([200.193.161.90]:25797 "EHLO 3-090.ctame701-1.telepar.net.br") by vger.kernel.org with ESMTP id ; Fri, 1 Nov 2002 22:38:43 -0500 Date: Sat, 2 Nov 2002 01:44:47 -0200 (BRST) From: Rik van Riel X-X-Sender: riel@imladris.surriel.com To: Andrew Morton cc: William Lee Irwin III , , , Subject: Re: idle time & iowait accounting In-Reply-To: <3DC34808.A8FE6FAC@digeo.com> Message-ID: X-spambait: aardvark@kernelnewbies.org X-spammeplease: aardvark@nl.linux.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 865 Lines: 31 On Fri, 1 Nov 2002, Andrew Morton wrote: > > + preempt_disable(); > > + rq = this_rq(); > > + atomic_inc(&rq->nr_iowait); > > + schedule(); > > + atomic_dec(&rq->nr_iowait); > > + preempt_enable(); > "scheduling while atomic". Point. > You'll need to reacquire the runqueue pointer on waking up. No. It makes sense to decrement the same counter that was incremented before. regards, Rik -- Bravely reimplemented by the knights who say "NIH". http://www.surriel.com/ http://distro.conectiva.com/ Current spamtrap: october@surriel.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/