Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2340243imu; Sat, 8 Dec 2018 22:21:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/WqtyvABhpgRFTkwqUKrklti4g1xPQcvguxViP2xYSRE5HqbVDYdjXTkpzyAHK2wv4UUXfi X-Received: by 2002:a17:902:bd92:: with SMTP id q18mr7894926pls.167.1544336484127; Sat, 08 Dec 2018 22:21:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544336484; cv=none; d=google.com; s=arc-20160816; b=al1JjStd8IQKsaYePaFGefvOz+2emI3zD5wHCXvXw2QD5C9peWrxxUIGhfOYUZoWzH iMErFdBSKTYwmNGT+5WdtycORENiTFx8gVBIIFoDXtCfWriSrtvxcN5SfxoWIdVURy32 oS3o+UyxanvcaNH5oyL+6FjxhBZmr92McowllDY+TwDSfExE4jRleUvMTlNZ6VaEF3G9 Vdqwl6N25twXD57S9kpTDs4ZM7dej8n9A/2plsDhHO6KoTBRxU8R+/aITTqB1XlpoeDE 6vBLWVTvfyC/WR3yiNxSes1vjIe65+2/Z4pL9zno6lCrXqt4TYyiFdcKRKXCQA9ABXVZ oL3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=KsUYlcXzKm/UKKYGb/7A7EVppzI14sZkMJSXxWtlLdo=; b=02GG8DoS+y3B2MN1ibkAxfYuxx6yWJqexyiuC8PoOqMUqEvfhIlFnJn0id/ReNZCjA 7udfvapF5zRW/CTOa0yR46PaSeQf0J1qxYqfUygEtVoXSJGOPqvJvblszPVOU0BCGfVu b9/1hxGQJ4AHR8Oy6x725Of2dauqi3rC7mY88rG0ttroDthbVg6m5lkEjwAEAzyJkweL FTRsMaiZTiAEQw5Wv+RKFv3owGYVywfgPV6u5zXNlvIwh4j3UKCjLRxC4APPBfULuY25 0bLvhNzrEfb/ooHRRBSBKNbRRM4spaXB0e4MKI4MSzv0b7HqIpfWMRBRneJ5bXstiS/0 5Wug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=Q58Es1dz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2si6895852plt.101.2018.12.08.22.21.08; Sat, 08 Dec 2018 22:21:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=Q58Es1dz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726113AbeLIGUD (ORCPT + 99 others); Sun, 9 Dec 2018 01:20:03 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33574 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbeLIGUC (ORCPT ); Sun, 9 Dec 2018 01:20:02 -0500 Received: by mail-pg1-f194.google.com with SMTP id z11so3516445pgu.0 for ; Sat, 08 Dec 2018 22:20:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KsUYlcXzKm/UKKYGb/7A7EVppzI14sZkMJSXxWtlLdo=; b=Q58Es1dzUJP02dv0h99RLvwF8q9hSoWlIw8GQFlt+GPdu2XJQD9lItkfzkA1Y0ARDe C8HEL4eu8+OwY/lS9vMSiuU3/H0AcO83V5aPlufx3g849dAWaFB3mB1JD8dP9ZurPbF/ bjztVyguEOE0rEMtVvHH5orhoMphLIJQnftjlmblt1yvNqX6J7ATeVSlmJjuN1Dowjtq RWDXGN4EEfzLGAlD71kob7JNUL5JoPmObJR64YK4ElloBeJFZHv3GnS5sI2+JpTHvUlx w/+oFAdgCOxytFPuMbf+4SiHbSQJECZ4gri0P8ecvwxWZdnioYAMT1x/CNIzTjGZ2WFr QmDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KsUYlcXzKm/UKKYGb/7A7EVppzI14sZkMJSXxWtlLdo=; b=t61xQzEJwWmn9QHQ3+fV4qSL5hRTYRqqs8UBJzhMyKHDY0uMc+l5bu99JIgBEdaRL9 zWB6TBeAoMw/c8O5pG7HDn+rQy7bBlpm11dBTeGmqVUAwEhM8QcQB0lGUL/B4BsLOU5U LrRZB803/0yWOULiAm/4+HEKDXHc2lZUQnO7OKx4uODeWB0g9gMFtPUzZv09napa1U8j CToZElQcth8lk6M+G1d+9PEdvYpzLVE1qBK5GMu1A1zzvCdvnukwQmpXuuv6wAMPcFOi e9iREVxuNl7bdz5ahEcqDnpQ/F69jiIa7o9PxiwKeomfHVz1lPjIYGOgxcR5M6dFOXXV THrw== X-Gm-Message-State: AA+aEWZMwv9t1RkQLR2i4kIXrgv0I2SRxXiyRgRtCyxfreuXUYWCabns gGkb0zyPmb9uPUs9x7pQshtanw== X-Received: by 2002:a63:1e17:: with SMTP id e23mr6974841pge.130.1544336401764; Sat, 08 Dec 2018 22:20:01 -0800 (PST) Received: from [192.168.1.238] (66.29.188.166.static.utbb.net. [66.29.188.166]) by smtp.gmail.com with ESMTPSA id a90sm14897779pfj.109.2018.12.08.22.20.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Dec 2018 22:20:00 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 2/3] sbitmap: ammortize cost of clearing bits From: Jens Axboe X-Mailer: iPhone Mail (16C5050a) In-Reply-To: <20181209055146.GA17190@roeck-us.net> Date: Sat, 8 Dec 2018 23:19:59 -0700 Cc: linux-block@vger.kernel.org, osandov@osandov.com, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <6AAE999B-AB08-46D0-9DF8-9CED32E6141B@kernel.dk> References: <20181130011234.32674-1-axboe@kernel.dk> <20181130011234.32674-3-axboe@kernel.dk> <20181209055146.GA17190@roeck-us.net> To: Guenter Roeck Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Dec 8, 2018, at 10:51 PM, Guenter Roeck wrote: >=20 > Hi, >=20 >> On Thu, Nov 29, 2018 at 06:12:33PM -0700, Jens Axboe wrote: >> sbitmap maintains a set of words that we use to set and clear bits, with >> each bit representing a tag for blk-mq. Even though we spread the bits >> out and maintain a hint cache, one particular bit allocated will end up >> being cleared in the exact same spot. >>=20 >> This introduces batched clearing of bits. Instead of clearing a given >> bit, the same bit is set in a cleared/free mask instead. If we fail >> allocating a bit from a given word, then we check the free mask, and >> batch move those cleared bits at that time. This trades 64 atomic bitops >> for 2 cmpxchg(). >>=20 >> In a threaded poll test case, half the overhead of getting and clearing >> tags is removed with this change. On another poll test case with a >> single thread, performance is unchanged. >>=20 >> Signed-off-by: Jens Axboe >=20 > This patch results in irq lock inversion warnings when trying to boot > from usb drives. This was observed with qemu boots of aarch64, x86, and > x86_64 images. This one is a false positive, was already reported last week. Just need to a= dd some lockdep annotation for it.=20