From patchwork Tue Oct 9 21:29:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 1571651 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C77A1DFFAD for ; Tue, 9 Oct 2012 21:29:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756853Ab2JIV3m (ORCPT ); Tue, 9 Oct 2012 17:29:42 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:42075 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753278Ab2JIV3l (ORCPT ); Tue, 9 Oct 2012 17:29:41 -0400 Received: by mail-pa0-f46.google.com with SMTP id hz1so5639092pad.19 for ; Tue, 09 Oct 2012 14:29:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=pp8rbga/XnWefNgWmuqk935GKmzOR/wRl1IIkJA3QOo=; b=EUvF19Zlc/ZYT/EVXU/VQxKrK+sa9Bn/4VVzhy4ifF02GwuOIzxGBRcUJdAkmvZ/en 7cKDpVM5AmYpIndlvL+DEQCNy9Nhc2vsu3jd2V+04wATjitqpWaRY29bxBZAxn79baPF TUHSMSSwJxIUznCo3BZptVlzUGWRLS5HM82z8vvp0it9DNy3aOy+vYAue5afSqmwe5I8 /OHSbRHgMKN9Jd8e+SxfacV1+viDOuLr2jrmdHHtyAi63AosM9OKaA2Fgt0NDnyyvMl+ IApkWUizSXbDnnoA34ynhl/L+XfUJnF/vMa/yXlUULohHa5a/VaZ+nKK7tJJyyuk0lHL OTbA== Received: by 10.66.78.198 with SMTP id d6mr16549615pax.61.1349818181464; Tue, 09 Oct 2012 14:29:41 -0700 (PDT) Received: from ?IPv6:2607:f298:a:607:4823:f93f:93c7:61da? ([2607:f298:a:607:4823:f93f:93c7:61da]) by mx.google.com with ESMTPS id sa2sm12939964pbc.4.2012.10.09.14.29.39 (version=SSLv3 cipher=OTHER); Tue, 09 Oct 2012 14:29:40 -0700 (PDT) Message-ID: <50749742.2080104@inktank.com> Date: Tue, 09 Oct 2012 14:29:38 -0700 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120912 Thunderbird/15.0.1 MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Subject: [PATCH 1/2] libceph: mark ceph_msgr_wq reentrant References: <50749701.8010208@inktank.com> In-Reply-To: <50749701.8010208@inktank.com> X-Gm-Message-State: ALoCoQllqwWJguThiN5VzaYLXcpvt13sPMyBd1I94eITVTbzjDgngJ/crufZKe43Z3iqO2b8ams6 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org The ceph messenger workqueue is used to activate execution of the messenger state machine loop con_work(). The work queue used is allocated with flag WQ_NON_REENTRANT, which only allows a single work item on the queue to execute at a time. There is no need for this restriction, because each connection maintains its own state and manipulation of each connection is protected by the connection's mutex. So drop the WQ_NON_REENTRANT flag when allocating this work queue. This will allow different connections to be operated on at the same time. Signed-off-by: Alex Elder --- net/ceph/messenger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 159aa8b..28ed904 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -190,7 +190,7 @@ int ceph_msgr_init(void) zero_page = ZERO_PAGE(0); page_cache_get(zero_page); - ceph_msgr_wq = alloc_workqueue("ceph-msgr", WQ_NON_REENTRANT, 0); + ceph_msgr_wq = alloc_workqueue("ceph-msgr", 0, 0); if (ceph_msgr_wq) return 0;