Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753454Ab0FIFfI (ORCPT ); Wed, 9 Jun 2010 01:35:08 -0400 Received: from mx3.mail.elte.hu ([157.181.1.138]:46801 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752045Ab0FIFfF (ORCPT ); Wed, 9 Jun 2010 01:35:05 -0400 Date: Wed, 9 Jun 2010 07:34:27 +0200 From: Ingo Molnar To: Linus Torvalds , Jens Axboe , Peter Zijlstra Cc: "Rafael J. Wysocki" , Carl Worth , Eric Anholt , Venkatesh Pallipadi , Jens Axboe , Dave Airlie , Jesse Barnes , David H?rdeman , Mauro Carvalho Chehab , Eric Dumazet , Linux Kernel Mailing List , Maciej Rutecki , Andrew Morton , Kernel Testers List , Network Development , Linux ACPI , Linux PM List , Linux SCSI List , Linux Wireless List , DRI Subject: Re: 2.6.35-rc2-git2: Reported regressions from 2.6.34 Message-ID: <20100609053427.GA14857@elte.hu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-08-17) X-ELTE-SpamScore: -2.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.5 -2.0 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3443 Lines: 90 * Linus Torvalds wrote: > > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=16129 > > Subject : BUG: using smp_processor_id() in preemptible [00000000] code: jbd2/sda2 > > Submitter : Jan Kreuzer > > Date : 2010-06-05 06:15 (4 days old) > > This seems to have been introduced by > > commit 7cbaef9c83e58bbd4bdd534b09052b6c5ec457d5 > Author: Ingo Molnar > Date: Sat Nov 8 17:05:38 2008 +0100 > > sched: optimize sched_clock() a bit > > sched_clock() uses cycles_2_ns() needlessly - which is an irq-disabling > variant of __cycles_2_ns(). > > Most of the time sched_clock() is called with irqs disabled already. > The few places that call it with irqs enabled need to be updated. > > Signed-off-by: Ingo Molnar > > and this seems to be one of those calling cases that need to be updated. That's a commit from 2008. > Ingo? The call trace is: > > BUG: using smp_processor_id() in preemptible [00000000] code: jbd2/sda2-8/337 > caller is native_sched_clock+0x3c/0x68 > Pid: 337, comm: jbd2/sda2-8 Not tainted 2.6.35-rc1jan+ #4 > Call Trace: > [] debug_smp_processor_id+0xc9/0xe4 > [] native_sched_clock+0x3c/0x68 > [] sched_clock+0x9/0xd > [] blk_rq_init+0x97/0xa3 > [] get_request+0x1c4/0x2d0 > [] get_request_wait+0x29/0x1a6 > [] __make_request+0x338/0x45b > [] generic_make_request+0x2bb/0x330 > [] submit_bio+0xd2/0xef > [] submit_bh+0xf4/0x116 > [] block_write_full_page_endio+0x89/0x96 > [] block_write_full_page+0x15/0x17 > [] ext4_writepage+0x356/0x36b > [] __writepage+0x1a/0x39 > [] write_cache_pages+0x20d/0x346 > [] generic_writepages+0x27/0x29 > [] journal_submit_data_buffers+0x110/0x17d > [] jbd2_journal_commit_transaction+0x4cb/0x156d > [] kjournald2+0x147/0x37a > > (from the bugzilla thing) The warning was introduced by this fresh commit (and a followup commit) merged in the .35 merge window: | commit 9195291e5f05e01d67f9a09c756b8aca8f009089 | Author: Divyesh Shah | Date: Thu Apr 1 15:01:41 2010 -0700 | | blkio: Increment the blkio cgroup stats for real now IIRC Jens posted a fix for the regression. Jens, what's the status of that? As the code there started using a raw sched_clock() call for block statistics purposes, which was a poorly thought out (and buggy) approach: - it takes timestamps on different cpus and then compares then, but doesnt consider that sched_clock() is not comparable between CPUs without extra care - it doesnt consider the possibility for the sched_clock() result going backwards on certain platforms (such as x86) - it doesnt consider preemptability (There's work ongoing to add a clock variant that can be used for such purposes, but that's .36 fodder.) Thanks, Ingo -- 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/