From patchwork Wed Nov 9 22:35:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 9420223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 251DC601C2 for ; Wed, 9 Nov 2016 22:35:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 147CE29176 for ; Wed, 9 Nov 2016 22:35:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 064322922A; Wed, 9 Nov 2016 22:35:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D94E329176 for ; Wed, 9 Nov 2016 22:35:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752933AbcKIWf2 (ORCPT ); Wed, 9 Nov 2016 17:35:28 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:35897 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752652AbcKIWf1 (ORCPT ); Wed, 9 Nov 2016 17:35:27 -0500 Received: by mail-qk0-f195.google.com with SMTP id h201so18419308qke.3 for ; Wed, 09 Nov 2016 14:35:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poochiereds-net.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=qalogY+p/EmHXOTTrzBPclwHiOHctzV4Wd07jb4ybdA=; b=xeMIja4rA78rc8dlfjbIutp5BOHIdhU4B3VbLbeWE0OZTDHMiThogTUJY9tBWIpnOl JkHuTEg/BwygpH4c5u+5qTsbQ+3cpgZEdLUtaUqUsbFV0RfisfDxgeZw8YuflsqMr2XJ Q+lX8Yvb4a7SKCQu1oHc1wchnzIFE1fFnWPUpLL+v7op5iu4KHb5HpUagFj+qZQNlDs+ LK2pkkQ/iRzhSZXc3OrloM+u7z5BxFLj0Ecux5aMAlLwvTzdVlGbzJ5CFPqCjEp/mxD+ z29lCX1LblvjsdOU/+IwcMd4nE01uRP6DXpr0ZNZwsngEmZQjVk5RuQKx2Q489zZIpUa NrYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=qalogY+p/EmHXOTTrzBPclwHiOHctzV4Wd07jb4ybdA=; b=nCjgb2+SQbBFmdK6fkEfQl+BnmEcA6tG7TjjUUgtDrF38DIgzznHvLCzLsz+lIHaBp Cq0WqzD6d8/TCAzYxeF89IR7FA75WyErCCpRlhGPmEP7P6NYiUqR0n2v+6jfd99PS53+ OAr8BHfCvu3SUguEskYplOdf0HlBzsooMLbgK9PzV6caflfPNlLdt3QqIalJMQjx3oK6 u0qcYlmPhWyxWtCNvyMsPeBA54DREkNHJppE32ClEYEHWM2xOzv6Bi2aBvWh/McaGH12 OjbiCO5iLGKnyDU6CHkm5s+mi51tVHFFnFZCf9K2ku/nV1zt/xYxQkgczDsXwd8wvLff KN1Q== X-Gm-Message-State: ABUngvfM7LA4wOgJLhRQ0qxrID2EpJPAZ+0H2/jwIcMnvSP9HAw1RcWEb53y7zFkIRtZIg== X-Received: by 10.55.12.2 with SMTP id 2mr2376052qkm.68.1478730926432; Wed, 09 Nov 2016 14:35:26 -0800 (PST) Received: from cpe-2606-A000-1125-405B-9CA0-3277-6D19-9D1B.dyn6.twc.com (cpe-2606-A000-1125-405B-9CA0-3277-6D19-9D1B.dyn6.twc.com. [2606:a000:1125:405b:9ca0:3277:6d19:9d1b]) by smtp.gmail.com with ESMTPSA id f46sm954679qtf.30.2016.11.09.14.35.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Nov 2016 14:35:25 -0800 (PST) Message-ID: <1478730923.24935.3.camel@poochiereds.net> Subject: Re: [PATCH v2] fs/nfsd/nfs4callback: Remove deprecated create_singlethread_workqueue From: Jeff Layton To: "J. Bruce Fields" Cc: Tejun Heo , Bhaktipriya Shridhar , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 09 Nov 2016 17:35:23 -0500 In-Reply-To: <20161109202359.GC4952@fieldses.org> References: <20160830205348.GA31915@Karyakshetra> <20161108213911.GA27681@fieldses.org> <20161108225221.GB6460@htj.duckdns.org> <20161109012725.GA29930@fieldses.org> <1478697488.7930.7.camel@poochiereds.net> <20161109162752.GA4952@fieldses.org> <1478712815.7930.28.camel@poochiereds.net> <20161109194724.GB4952@fieldses.org> <20161109202359.GC4952@fieldses.org> X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 2016-11-09 at 15:23 -0500, J. Bruce Fields wrote: On Wed, Nov 09, 2016 at 02:47:24PM -0500, J. Bruce Fields wrote: For now I wish we could just like to continue assuming the workqueue processes only one item at a time. Do we have that now, or do we need to switch to (looking at workqueue.h...) alloc_ordered workqueue()? Oh, wait, I missed the _ordered_ in: #define create_singlethread_workqueue(name) \ alloc_ordered_workqueue("%s", __WQ_LEGACY | WQ_MEM_RECLAIM, name) So our existing create_singlethread_workqueue is fine--but we probably don't need those flags: --b. That looks good to me. Eventually we could better serialize the handling of the callback code and move to an unordered workqueue, but for now I think Bruce is right that we have to keep it. Reviewed-by: Jeff Layton --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 211dc2aed8e1..eb78109d666c 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -1061,7 +1061,7 @@ static const struct rpc_call_ops nfsd4_cb_ops = { int nfsd4_create_callback_queue(void) { - callback_wq = create_singlethread_workqueue("nfsd4_callbacks"); + callback_wq = alloc_ordered_workqueue("nfsd4_callbacks", 0); if (!callback_wq) return -ENOMEM; return 0;