From patchwork Fri Oct 10 18:27:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 5066751 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E59BDC11AC for ; Fri, 10 Oct 2014 18:27:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F24D020212 for ; Fri, 10 Oct 2014 18:27:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 213B52018E for ; Fri, 10 Oct 2014 18:27:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751867AbaJJS1W (ORCPT ); Fri, 10 Oct 2014 14:27:22 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:38118 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbaJJS1W (ORCPT ); Fri, 10 Oct 2014 14:27:22 -0400 Received: by mail-la0-f54.google.com with SMTP id gm9so3672339lab.41 for ; Fri, 10 Oct 2014 11:27:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pbfCcWNIRD5I+FxiJPdsVlcxqtpLG7Gv0pVYqJoAg44=; b=mORykgLmv8Jpyb5S/Mh6tMv3Bl3OnFCCFYjcVT9EW7UZ8bMxZPjzL9Q0+bo8Rl8hik KccjvYk7NDVGxgfWggeGXbGhKzayo2lLb5W01LxWN5cGbd28YAFv0upnYRZkfget5r+b WhqHyjjiGBhuSXJ1hZpFlx7JHnJ47Asjtz0PcITDeHca4slHRNhsLb7mQF/Yer/y4YqM Ny4LpNRFmcl/b/09w1wMHO6WvCf/0j1XnPZyCzmtzcJZMijOIvFxZChYBapBPDJltNbY Yo6Wbo7bdAqCx/5Q7TqsY33XTCt5tyHgUY19ieuELQPsZmzea/5gHCfrsrJnd9I9wepe tUlA== X-Gm-Message-State: ALoCoQkFbFdABSdTm6XAKMb6ogXs/YCrD18CILmZFavLbu+hJNt8GiIb4kH6rBeteAccxLKXhDpd X-Received: by 10.112.56.198 with SMTP id c6mr6626010lbq.43.1412965640754; Fri, 10 Oct 2014 11:27:20 -0700 (PDT) Received: from localhost ([109.110.67.138]) by mx.google.com with ESMTPSA id w8sm2019451lal.41.2014.10.10.11.27.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 10 Oct 2014 11:27:20 -0700 (PDT) From: Ilya Dryomov X-Google-Original-From: Ilya Dryomov To: ceph-devel@vger.kernel.org Cc: Micha Krause Subject: [PATCH 2/3] rbd: rbd workqueues need a resque worker Date: Fri, 10 Oct 2014 22:27:05 +0400 Message-Id: <1412965626-11165-3-git-send-email-idryomov@redhat.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1412965626-11165-1-git-send-email-idryomov@redhat.com> References: <1412965626-11165-1-git-send-email-idryomov@redhat.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Need to use WQ_MEM_RECLAIM for our workqueues to prevent I/O lockups under memory pressure - we sit on the memory reclaim path. Cc: stable@vger.kernel.org # 3.17, needs backporting for 3.16 Signed-off-by: Ilya Dryomov Tested-by: Micha Krause Reviewed-by: Sage Weil --- drivers/block/rbd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 7712ae65753c..0a54c588e433 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -5242,7 +5242,8 @@ static int rbd_dev_device_setup(struct rbd_device *rbd_dev) set_capacity(rbd_dev->disk, rbd_dev->mapping.size / SECTOR_SIZE); set_disk_ro(rbd_dev->disk, rbd_dev->mapping.read_only); - rbd_dev->rq_wq = alloc_workqueue("%s", 0, 0, rbd_dev->disk->disk_name); + rbd_dev->rq_wq = alloc_workqueue("%s", WQ_MEM_RECLAIM, 0, + rbd_dev->disk->disk_name); if (!rbd_dev->rq_wq) { ret = -ENOMEM; goto err_out_mapping;