| To: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 2/5] xfs: use per-filesystem I/O completion workqueues |
| From: | Tejun Heo <tj@xxxxxxxxxx> |
| Date: | Mon, 14 Nov 2011 10:13:53 -0800 |
| Cc: | Ben Myers <bpm@xxxxxxx>, xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=6lXS1g+fRv5lw1kNKCQXl5K3e4giy+25bUW3/AN/nIk=; b=fxqZGGP5dSHg89BcL0AZay9hYOsQ30XRP4uFudG9byevW0i6YAujEZwlPc9h8dEv/x pqP3C9V6a2Byg+0WDbp0xISWzSAZE5u+z4racxLg4FYrsgc6PaMAidWOLyUXUZKQfgKx ow39L2So8K+eW7a0tP5USR8lRAQrErvvzAO0g= |
| In-reply-to: | <20111114103410.GD31043@xxxxxxxxxxxxx> |
| References: | <20111108085614.478431403@xxxxxxxxxxxxxxxxxxxxxx> <20111108085846.291838677@xxxxxxxxxxxxxxxxxxxxxx> <20111108231118.GP5534@dastard> <20111109075847.GA20604@xxxxxxxxxxxxx> <20111110174242.GZ20464@xxxxxxx> <20111114103410.GD31043@xxxxxxxxxxxxx> |
| Sender: | Tejun Heo <htejun@xxxxxxxxx> |
| User-agent: | Mutt/1.5.20 (2009-06-14) |
Hello, Christoph.
On Mon, Nov 14, 2011 at 05:34:10AM -0500, Christoph Hellwig wrote:
> On Thu, Nov 10, 2011 at 11:42:42AM -0600, Ben Myers wrote:
> > > +STATIC int
> > > +xfs_init_mount_workqueues(
> > > + struct xfs_mount *mp)
> > > +{
> > > +#define XFS_WQ_NAME_LEN 512
> > > + char name[XFS_WQ_NAME_LEN];
> > > +
> > > + snprintf(name, XFS_WQ_NAME_LEN, "xfs-data/%s", mp->m_fsname);
> > > + mp->m_data_workqueue = alloc_workqueue(name, WQ_MEM_RECLAIM, 1);
> > > + if (!mp->m_data_workqueue)
> > > + goto out;
> >
> > Looks to me like alloc_workqueue holds on to that name pointer in
> > wq->name... won't overwriting the name below be a problem?
>
> It applies deep magic to make sure a pattern like mine is fine for
> the lockdep lock name, but just uses it directly for the workqueue name.
For lockdep lock name, it isn't about reusing but ensuring that same
lockdep key doesn't end up with different names which lockdep doesn't
allow. But yeah, given that workqueue is dynamically allocated, it's
a bit silly to require the name to be constant.
> Oddly enough the names seem to display correctly on my test systems
> anyway.
>
> Tejun, any chance to change alloc_workqueue to use the string pasting
> trick also for the normal workqueue name, or even better add a varargs
> version of alloc_workqueue?
Yeah, will whip something up.
Thanks.
--
tejun
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 2/2] xfs_repair: Properly set lost+found inode as used, Ben Myers |
|---|---|
| Next by Date: | Re: [PATCH repair: do not walk the unlinked inode list, Christoph Hellwig |
| Previous by Thread: | Re: [PATCH 2/5] xfs: use per-filesystem I/O completion workqueues, Christoph Hellwig |
| Next by Thread: | [PATCH 4/5] xfs: log file size updates as part of unwritten extent conversion, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |