[Top] [All Lists]

Re: [PATCH 1/5] xfs: use per-filesystem I/O completion workqueues

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/5] xfs: use per-filesystem I/O completion workqueues
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 16 Feb 2012 17:57:19 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120207181154.999363063@xxxxxxxxxxxxxxxxxxxxxx>
References: <20120207181037.745771452@xxxxxxxxxxxxxxxxxxxxxx> <20120207181154.999363063@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Feb 07, 2012 at 01:10:38PM -0500, Christoph Hellwig wrote:
> The new concurrency managed workqueues are cheap enough that we can create
> per-filesystem instead of global workqueues.  This allows us to remove the
> trylock or defer scheme on the ilock, which is not helpful once we have
> outstanding log reservations until finishing a size update.


And it removes some of the issues with dependencies between
filesystems like loopback mounted XFS-on-XFS filesystems, though to
fix them completely we also need per-filesystem log workqueues. Is
it worth just converting that one as well in this patch just to
remove all global work queues?

> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

> +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;

As of b196be8 ("workqueue: make alloc_workqueue() take printf fmt and
args for name"), this dance is not necessary. somethign like:

        mp->m_data_workqueue = alloc_workqueue(name, WQ_MEM_RECLAIM, 1,
                                                "xfs-data/%s", mp->m_fsname);

will work just fine.

Also, I thin kwe want significant parallelism on this workqueue -
having an inode block on an ilock shoul dnot stop us from processing
other ioends in the same fs....


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>