From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754346AbcIISma (ORCPT ); Fri, 9 Sep 2016 14:42:30 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35428 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752015AbcIISm1 (ORCPT ); Fri, 9 Sep 2016 14:42:27 -0400 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 v3 0/5] blk-mq: abstract tag allocation out into sbitmap library Date: Fri, 9 Sep 2016 11:42:06 -0700 Message-Id: X-Mailer: git-send-email 2.9.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Omar Sandoval This is v3 of the scalable bitmap library derived from blk-mq's tag allocation code. v1 is here [1], v2 is here [2]. Changes in v3: - Renamed scale_bitmap to sbitmap Changes in v2: - Return -EINVAL instead of BUG_ON() if an invalid shift is passed to the initialization functions. - Rename last_cache to alloc_hint. - Split the wait queue allocation change into a separate patch. Patch 1 should now be a no-op. - Add patches 3 and 4 to make the API cleaner by pushing some context from the blk-mq data structures into the common scale_bitmap code. - Add patch 5 to randomize the allocation hint on initialization like was intended originally for blk-mq. Applies to v4.8-rc5. 1: http://marc.info/?l=linux-block&m=147251402805405 2: http://marc.info/?l=linux-block&m=147329198222482 Omar Sandoval (5): blk-mq: abstract tag allocation out into sbitmap library sbitmap: allocate wait queues on a specific node sbitmap: push per-cpu last_tag into sbitmap_queue sbitmap: push alloc policy into sbitmap_queue sbitmap: randomize initial last_cache values MAINTAINERS | 1 + block/Kconfig | 1 + block/blk-mq-tag.c | 503 +++++++++++------------------------------------- block/blk-mq-tag.h | 42 ++-- block/blk-mq.c | 114 ++++------- block/blk-mq.h | 11 -- include/linux/blk-mq.h | 9 +- include/linux/sbitmap.h | 379 ++++++++++++++++++++++++++++++++++++ lib/Kconfig | 3 + lib/Makefile | 2 + lib/sbitmap.c | 320 ++++++++++++++++++++++++++++++ 11 files changed, 868 insertions(+), 517 deletions(-) create mode 100644 include/linux/sbitmap.h create mode 100644 lib/sbitmap.c -- 2.9.3