From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760723AbYGBWcW (ORCPT ); Wed, 2 Jul 2008 18:32:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750700AbYGBWcO (ORCPT ); Wed, 2 Jul 2008 18:32:14 -0400 Received: from smtp-out.google.com ([216.239.33.17]:50901 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750781AbYGBWcM (ORCPT ); Wed, 2 Jul 2008 18:32:12 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:message-id:date:from:to:subject:cc:in-reply-to: mime-version:content-type:content-transfer-encoding: content-disposition:references; b=KycnF++PSX7ukkVOw+JxK0noEa8TbySixnjCI55zApbbZLBoO6oXRdRAGL4IgFzJi DBoYLAJL107Dwd9uJoEsw== Message-ID: <6599ad830807021531r16013460re28f813be8293d6c@mail.gmail.com> Date: Wed, 2 Jul 2008 15:31:59 -0700 From: "Paul Menage" To: "Max Krasnyansky" Subject: Re: [RFC][PATCH] CGroups: Add a per-subsystem hierarchy lock Cc: a.p.zijlstra@chello.nl, pj@sgi.com, vegard.nossum@gmail.com, linux-kernel@vger.kernel.org In-Reply-To: <486AFC33.7010901@qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080627075912.92AE43D6907@localhost> <6599ad830806271702y2c1df2edh3a75dda75336ddad@mail.gmail.com> <486AFC33.7010901@qualcomm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 1, 2008 at 8:55 PM, Max Krasnyansky wrote: > I was about to say "yeah, looks good" and then tried a couple of > different hot-plug scenarious. > We still have circular locking even with your patch > What sequence of actions do you do? I've not been able to reproduce a lockdep failure. Paul > [ INFO: possible circular locking dependency detected ] > 2.6.26-rc8 #4 > ------------------------------------------------------- > bash/2779 is trying to acquire lock: > (&cpu_hotplug.lock){--..}, at: [] get_online_cpus+0x24/0x40 > > but task is already holding lock: > (sched_domains_mutex){--..}, at: [] > partition_sched_domains+0x29/0x2b0 > > which lock already depends on the new lock. > > the existing dependency chain (in reverse order) is: > > -> #2 (sched_domains_mutex){--..}: > [] __lock_acquire+0x9cf/0xe50 > [] lock_acquire+0x5b/0x80 > [] mutex_lock_nested+0x94/0x250 > [] partition_sched_domains+0x29/0x2b0 > [] rebuild_sched_domains+0x9d/0x3f0 > [] cpuset_handle_cpuhp+0x205/0x220 > [] notifier_call_chain+0x3f/0x80 > [] __raw_notifier_call_chain+0x9/0x10 > [] _cpu_down+0xa8/0x290 > [] cpu_down+0x3b/0x60 > [] store_online+0x48/0xa0 > [] sysdev_store+0x24/0x30 > [] sysfs_write_file+0xca/0x140 > [] vfs_write+0xcb/0x170 > [] sys_write+0x50/0x90 > [] system_call_after_swapgs+0x7b/0x80 > [] 0xffffffffffffffff > > -> #1 (&ss->hierarchy_mutex){--..}: > [] __lock_acquire+0x9cf/0xe50 > [] lock_acquire+0x5b/0x80 > [] mutex_lock_nested+0x94/0x250 > [] cpuset_handle_cpuhp+0x39/0x220 > [] notifier_call_chain+0x3f/0x80 > [] __raw_notifier_call_chain+0x9/0x10 > [] _cpu_down+0xa8/0x290 > [] cpu_down+0x3b/0x60 > [] store_online+0x48/0xa0 > [] sysdev_store+0x24/0x30 > [] sysfs_write_file+0xca/0x140 > [] vfs_write+0xcb/0x170 > [] sys_write+0x50/0x90 > [] system_call_after_swapgs+0x7b/0x80 > [] 0xffffffffffffffff > > -> #0 (&cpu_hotplug.lock){--..}: > [] __lock_acquire+0xa53/0xe50 > [] lock_acquire+0x5b/0x80 > [] mutex_lock_nested+0x94/0x250 > [] get_online_cpus+0x24/0x40 > [] sched_getaffinity+0x11/0x80 > [] __synchronize_sched+0x19/0x90 > [] detach_destroy_domains+0x46/0x50 > [] partition_sched_domains+0xf9/0x2b0 > [] rebuild_sched_domains+0x9d/0x3f0 > [] cpuset_common_file_write+0x2b8/0x5c0 > [] cgroup_file_write+0x7c/0x1a0 > [] vfs_write+0xcb/0x170 > [] sys_write+0x50/0x90 > [] system_call_after_swapgs+0x7b/0x80 > [] 0xffffffffffffffff > > other info that might help us debug this: > > 2 locks held by bash/2779: > #0: (cgroup_mutex){--..}, at: [] cgroup_lock+0x12/0x20 > #1: (sched_domains_mutex){--..}, at: [] > partition_sched_domains+0x29/0x2b0 > > stack backtrace: > Pid: 2779, comm: bash Not tainted 2.6.26-rc8 #4 > > Call Trace: > [] print_circular_bug_tail+0x8c/0x90 > [] ? print_circular_bug_entry+0x54/0x60 > [] __lock_acquire+0xa53/0xe50 > [] ? get_online_cpus+0x24/0x40 > [] lock_acquire+0x5b/0x80 > [] ? get_online_cpus+0x24/0x40 > [] mutex_lock_nested+0x94/0x250 > [] ? mark_held_locks+0x4d/0x90 > [] get_online_cpus+0x24/0x40 > [] sched_getaffinity+0x11/0x80 > [] __synchronize_sched+0x19/0x90 > [] detach_destroy_domains+0x46/0x50 > [] partition_sched_domains+0xf9/0x2b0 > [] ? trace_hardirqs_on+0xc1/0xe0 > [] rebuild_sched_domains+0x9d/0x3f0 > [] cpuset_common_file_write+0x2b8/0x5c0 > [] ? cpuset_test_cpumask+0x0/0x20 > [] ? cpuset_change_cpumask+0x0/0x20 > [] ? started_after+0x0/0x50 > [] cgroup_file_write+0x7c/0x1a0 > [] vfs_write+0xcb/0x170 > [] sys_write+0x50/0x90 > [] system_call_after_swapgs+0x7b/0x80 > > CPU3 attaching NULL sched-domain. > > > >