[PATCH 5/6] xfs: convert the xfsaild threads to a workqueue
Christoph Hellwig
hch at infradead.org
Thu Mar 10 11:48:18 CST 2011
> STATIC int __init
> +xfs_init_workqueues(void)
> +STATIC void __exit
> +xfs_destroy_workqueues(void)
I don't think these helpers are overly useful.
> + xfs_ail_wq = alloc_workqueue("xfsail", WQ_CPU_INTENSIVE, 8);
> +}
> +static void
> +xfs_ail_push_queue(
> + struct xfs_ail *ailp,
> + xfs_lsn_t threshold_lsn,
> + int tout)
> +{
> + if (XFS_LSN_CMP(threshold_lsn, ailp->xa_target) > 0) {
> + ailp->xa_target = threshold_lsn;
> + queue_delayed_work(xfs_syncd_wq, &ailp->xa_work, tout);
tout is always one in the only caller and thus doesn't need to be
passed. But I think you really want a timeout of 0 here to queue it up
ASAP (it translates to a direct queue_work() call internally).
Also this function could simply be merged into it's only and relatively
simple caller.
More information about the xfs
mailing list