From patchwork Sat Sep 17 08:28:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Sandoval X-Patchwork-Id: 9337025 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 A53E660839 for ; Sat, 17 Sep 2016 08:29:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99E5829706 for ; Sat, 17 Sep 2016 08:29:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D5572973A; Sat, 17 Sep 2016 08:29:11 +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 27D0029706 for ; Sat, 17 Sep 2016 08:29:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755022AbcIQI26 (ORCPT ); Sat, 17 Sep 2016 04:28:58 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:36050 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755250AbcIQI2j (ORCPT ); Sat, 17 Sep 2016 04:28:39 -0400 Received: by mail-pa0-f52.google.com with SMTP id id6so32978053pad.3 for ; Sat, 17 Sep 2016 01:28:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=9foZaC5VgtFKzdLvuhepO7BAJhPn6fMAeNankSMb/6A=; b=PjbJ0Wnrs7QBmPyroftnRnnouyoHLshSKww0w8NJC4BCjH/XP8d5pXI32X/2Wc+94x qlZwHziA4EPXLrAZMv3VoiTH3+rS3ON8kXISftd0KxUkoSJj2X8lDOY97jlhPZ4ABGVE m+c4Uif900nlK5ASF+pajXd25Y+6Kh0mBNAuEySzGSbUHtrpxKFe1Wz4zWqrQmqckVF9 7+JJ5bIxI0nhTmRFFIk+5hgPC2X1Ys7ymllSAL2IVPO0lGIAwDiPAJ7Ur64YPM+uHhUV SKUQI9zpSjTQxzalufo1L2kOhNSZf/qRHlFb4CJWCNzWb0D66QQNacklqBe36bHBLwbG 8xiA== 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:in-reply-to:references; bh=9foZaC5VgtFKzdLvuhepO7BAJhPn6fMAeNankSMb/6A=; b=hHcoNyFQioWoHygVO/6uefwqGyxcUx5qLY01zj8h7zhGHSdHH332MUSp6Y0OB8ugnl 8YmVgG44sXXxF0kBkNo9aIYxAe9QsxBMOeEE2v1lozKbB6UvU8A6xlKHVpJiURi2pOre 3+x41HtfvERYUjUiQxcXt6zk+7uje0QLBS+BK8I+x5eaA7QYvkUKqXnvLi5dPEcsfHSE T5Ky/QwhfGF702qgHREbCpkY3yrDv67GZGpquB4enu3KiQSub4iO4DJe+FhVlhq5Lst5 NG5C9OsRuEEk4jakrvGtHAn/K440rsq0EK4vyQA2dgjC51O/EuANVhFrg4tWKC9TLVWB y7QQ== X-Gm-Message-State: AE9vXwP/aVWQabeiYv7To7+lq3cjcPALr0qS6WKxqv0bBqXW/PzvK4+IKpCHGvV1yCkbSx/V X-Received: by 10.66.67.9 with SMTP id j9mr29781047pat.27.1474100919082; Sat, 17 Sep 2016 01:28:39 -0700 (PDT) Received: from vader.thefacebook.com ([2620:10d:c090:180::1:1e34]) by smtp.gmail.com with ESMTPSA id ci9sm17173264pad.34.2016.09.17.01.28.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Sep 2016 01:28:38 -0700 (PDT) From: Omar Sandoval To: Jens Axboe , linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, Alexei Starovoitov Subject: [PATCH v4 2/6] sbitmap: allocate wait queues on a specific node Date: Sat, 17 Sep 2016 01:28:22 -0700 Message-Id: X-Mailer: git-send-email 2.9.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Omar Sandoval The original bt_alloc() we converted from was using kzalloc(), not kzalloc_node(), to allocate the wait queues. This was probably an oversight, so fix it for sbitmap_queue_init_node(). Signed-off-by: Omar Sandoval --- lib/sbitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sbitmap.c b/lib/sbitmap.c index dfc084a..4d8e97e 100644 --- a/lib/sbitmap.c +++ b/lib/sbitmap.c @@ -208,7 +208,7 @@ int sbitmap_queue_init_node(struct sbitmap_queue *sbq, unsigned int depth, sbq->wake_batch = sbq_calc_wake_batch(depth); atomic_set(&sbq->wake_index, 0); - sbq->ws = kzalloc(SBQ_WAIT_QUEUES * sizeof(*sbq->ws), flags); + sbq->ws = kzalloc_node(SBQ_WAIT_QUEUES * sizeof(*sbq->ws), flags, node); if (!sbq->ws) { sbitmap_free(&sbq->sb); return -ENOMEM;