From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH -v2] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved)) Date: Tue, 12 Mar 2013 11:47:18 -0700 Message-ID: <20130312184718.GA9749@kroah.com> References: <513ECCFE.3070201@huawei.com> <20130312101555.GB30758@dhcp22.suse.cz> <20130312110750.GC30758@dhcp22.suse.cz> <20130312130504.GD30758@dhcp22.suse.cz> <20130312133446.GA3514@kroah.com> <20130312162119.GB5963@dhcp22.suse.cz> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=x-received:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=4UwTV9PQZAEdhRPa9eFWxcL7iWrz4XyPEBLE2EXvZdk=; b=AtIp2FnnbtQJVm6bd8gxQll8qekrH9Hv3xkzngswJmqAmQZjWEpherxobIG0l9llbV 0l1gYY3DaJFjl6xpiUjERVvXrlI7LtHz/aFYJIePWqa4iP00NISmMOQHRU4iqcSanalq ooswbxGOWBIWXsD8UEm1UGvk6iv6xK3r4wtYY= Content-Disposition: inline In-Reply-To: <20130312162119.GB5963-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Michal Hocko Cc: Li Zefan , LKML , cgroups , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, KAMEZAWA Hiroyuki , Johannes Weiner , Andrew Morton , Jiri Kosina , Peter Zijlstra , Ingo Molnar , Kay Sievers On Tue, Mar 12, 2013 at 05:21:19PM +0100, Michal Hocko wrote: > On Tue 12-03-13 06:34:46, Greg Kroah-Hartman wrote: > > On Tue, Mar 12, 2013 at 02:05:04PM +0100, Michal Hocko wrote: > > > The fix is quite simple. We can pull the key inside bus_type structure > > > because they are defined per device so the pointer will be unique as > > > well. bus_register doesn't need to be a macro anymore so change it > > > to the inline. We could get rid of __bus_register as there is no other > > > caller but maybe somebody will want to use a different key so keep it > > > around for now. > > > > Nice work, but just drop __bus_register(), no one should need to use a > > new key for this type of thing, now that you have added a per-bus_type > > variable. > > OK v2 below. I have also ranamed __key to lock_key. Who is going to take > the patch? I will, thanks. greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx199.postini.com [74.125.245.199]) by kanga.kvack.org (Postfix) with SMTP id 473ED6B0006 for ; Tue, 12 Mar 2013 14:46:46 -0400 (EDT) Received: by mail-pb0-f47.google.com with SMTP id rp2so156429pbb.6 for ; Tue, 12 Mar 2013 11:46:45 -0700 (PDT) Date: Tue, 12 Mar 2013 11:47:18 -0700 From: Greg Kroah-Hartman Subject: Re: [PATCH -v2] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved)) Message-ID: <20130312184718.GA9749@kroah.com> References: <513ECCFE.3070201@huawei.com> <20130312101555.GB30758@dhcp22.suse.cz> <20130312110750.GC30758@dhcp22.suse.cz> <20130312130504.GD30758@dhcp22.suse.cz> <20130312133446.GA3514@kroah.com> <20130312162119.GB5963@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130312162119.GB5963@dhcp22.suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: Li Zefan , LKML , cgroups , linux-mm@kvack.org, KAMEZAWA Hiroyuki , Johannes Weiner , Andrew Morton , Jiri Kosina , Peter Zijlstra , Ingo Molnar , Kay Sievers On Tue, Mar 12, 2013 at 05:21:19PM +0100, Michal Hocko wrote: > On Tue 12-03-13 06:34:46, Greg Kroah-Hartman wrote: > > On Tue, Mar 12, 2013 at 02:05:04PM +0100, Michal Hocko wrote: > > > The fix is quite simple. We can pull the key inside bus_type structure > > > because they are defined per device so the pointer will be unique as > > > well. bus_register doesn't need to be a macro anymore so change it > > > to the inline. We could get rid of __bus_register as there is no other > > > caller but maybe somebody will want to use a different key so keep it > > > around for now. > > > > Nice work, but just drop __bus_register(), no one should need to use a > > new key for this type of thing, now that you have added a per-bus_type > > variable. > > OK v2 below. I have also ranamed __key to lock_key. Who is going to take > the patch? I will, thanks. greg k-h -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933399Ab3CLSqr (ORCPT ); Tue, 12 Mar 2013 14:46:47 -0400 Received: from mail-pb0-f54.google.com ([209.85.160.54]:63993 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932439Ab3CLSqp (ORCPT ); Tue, 12 Mar 2013 14:46:45 -0400 Date: Tue, 12 Mar 2013 11:47:18 -0700 From: Greg Kroah-Hartman To: Michal Hocko Cc: Li Zefan , LKML , cgroups , linux-mm@kvack.org, KAMEZAWA Hiroyuki , Johannes Weiner , Andrew Morton , Jiri Kosina , Peter Zijlstra , Ingo Molnar , Kay Sievers Subject: Re: [PATCH -v2] device: separate all subsys mutexes (was: Re: [BUG] potential deadlock led by cpu_hotplug lock (memcg involved)) Message-ID: <20130312184718.GA9749@kroah.com> References: <513ECCFE.3070201@huawei.com> <20130312101555.GB30758@dhcp22.suse.cz> <20130312110750.GC30758@dhcp22.suse.cz> <20130312130504.GD30758@dhcp22.suse.cz> <20130312133446.GA3514@kroah.com> <20130312162119.GB5963@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130312162119.GB5963@dhcp22.suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 12, 2013 at 05:21:19PM +0100, Michal Hocko wrote: > On Tue 12-03-13 06:34:46, Greg Kroah-Hartman wrote: > > On Tue, Mar 12, 2013 at 02:05:04PM +0100, Michal Hocko wrote: > > > The fix is quite simple. We can pull the key inside bus_type structure > > > because they are defined per device so the pointer will be unique as > > > well. bus_register doesn't need to be a macro anymore so change it > > > to the inline. We could get rid of __bus_register as there is no other > > > caller but maybe somebody will want to use a different key so keep it > > > around for now. > > > > Nice work, but just drop __bus_register(), no one should need to use a > > new key for this type of thing, now that you have added a per-bus_type > > variable. > > OK v2 below. I have also ranamed __key to lock_key. Who is going to take > the patch? I will, thanks. greg k-h