[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110302052320.GB7463@kilby.digium.internal>
Date: Tue, 1 Mar 2011 23:23:20 -0600
From: Shaun Ruffell <sruffell@...ffell.net>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Russ Meyerriecks <rmeyerriecks@...ium.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Greg KH <greg@...ah.com>
Subject: Re: [PATCH] mm/dmapool.c: Do not create/destroy sysfs file while
holding pools_lock
On Tue, Mar 01, 2011 at 08:35:53PM -0800, Eric W. Biederman wrote:
> Andrew Morton <akpm@...ux-foundation.org> writes:
> > One way of fixing this would be to create another singleton lock:
> >
> >
> > {
> > static DEFINE_MUTEX(pools_sysfs_lock);
> > static bool pools_sysfs_done;
> >
> > mutex_lock(&pools_sysfs_lock);
> > if (pools_sysfs_done == false) {
> > create_sysfs_stuff();
> > pools_sysfs_done = true;
> > }
> > mutex_unlock(&pools_sysfs_lock);
> > }
> >
> > That's not terribly pretty.
>
> Or possibly use module_init style magic. Where use module
> initialization and remove to trigger creation and deletion of the sysfs.
>
I'm not following how module initialization can help here. Are you suggesting
that all devices get a 'pools' attribute regardless of whether any dma pools
are actually created?
Shaun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists