Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6205262iob; Tue, 10 May 2022 12:48:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuYUsXWdHN8VbJFYLRT+xEO8898sbkguzvn8DC3GTKVCQX34u5FMq1ow8/4EoC/qYtDuiU X-Received: by 2002:a17:90b:606:b0:1d9:5dd5:1489 with SMTP id gb6-20020a17090b060600b001d95dd51489mr1454457pjb.171.1652212096632; Tue, 10 May 2022 12:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652212096; cv=none; d=google.com; s=arc-20160816; b=GK0eUYq4mql4UgWGo3DJSwTlCCkkYhJCFVj1Nj+YuNUTI7GTXJjDDLLw60Zxq0w9pO Y0cKbDhTUnSspkN6J9H86fmaCiLa7R4etdd0l4fZ24N2XsuZxnM2a7B2FrZddqjcWt80 JOerTv3t7/IyKCzaoAAsySn45WYeN2NYWo2cAS0mThAa/yvUJA8rWjcMuu7Ue3DLdrsQ dnjlmSnvwrvn9Y5+VkV3mDQowUbtqZRI4s8CzOND5sqwEA9e48Q0O69UfozXhlUVsIcB vhu4Dp6ckaOsD+kit2S6MrLRQD4CuiMpxfBEutje5aAqp6ShLmdZqBdTBXtN143rII4c DDDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fzxrrRn7cvywNO0Eg0g8MebJNrUAMkIxCPWEMLe1ccY=; b=dioAMg4tMnI0ApXjO8sUUIgRf41gTH/7OPMdW/gr3CJTnRW3IOfCpghUQn3j+ria+M k2cIbdaG/TqeenXDGiPRC9PZx9maL+10bKMAb+2KFpjIdDfMELXt+R4yozXNs1We8CCx Tc3wkTv1PJ2TNVT4jn9i4YvTfON9a7NYYsN5eqv6Cln1wM+/i2PNdA36c8V8Gr8keRjy XIARKYB6+fn5veE3ZcU3h8ikZWwt5LSKOBhkubt4GABbQ22u6hlczsfFMEcIBXEqKDCQ 2vx6ffi/E8djTV8dJAzyzRQHiAgaQ0PMtAfemoHaJ7F/TEDKWupzmqRjKDdt+ntL/NJ6 PJCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=Knxf+25k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16-20020a62f250000000b005087123810dsi17593603pfl.363.2022.05.10.12.48.01; Tue, 10 May 2022 12:48:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=Knxf+25k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242014AbiEJMzb (ORCPT + 99 others); Tue, 10 May 2022 08:55:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242059AbiEJMzK (ORCPT ); Tue, 10 May 2022 08:55:10 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DE351DE57D for ; Tue, 10 May 2022 05:50:38 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id qe3-20020a17090b4f8300b001dc24e4da73so1662896pjb.1 for ; Tue, 10 May 2022 05:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=fzxrrRn7cvywNO0Eg0g8MebJNrUAMkIxCPWEMLe1ccY=; b=Knxf+25kcpEt1lD1GjOJabs6ZQCKEJQ1n2FOsMOb8tgxCcfH/p+ESdNWzCoSL1+JZf GJeXvj2N86c0tABjp6OcRXyDPuRRZH4Yl4mxe8CZCRmHyA7Ih6t82i+FRuPur6OIsTKs N+Dv4oCnBx00eIAA2ZFDmqu2KaLd8ravhRD89bEV8ZA/N73jpbgm1KkcJqJ8hwIMU52U KNFtaLh4+J6omGoToE9+9ufHGmSdB9xDT/7pp8dUUM2EWRnB/+j/68PY42brWlMwKkQF xvzRor0v+R8WiTFLbSeykXRu6H3uQo+Q5NcjcJfGoIJOYL28BR6tHhL4YMI1qSed5GRa 8Pug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=fzxrrRn7cvywNO0Eg0g8MebJNrUAMkIxCPWEMLe1ccY=; b=KaFG0G6HV/NuvygrNMNe1bjFBvOhwo/+Sb4RQW+XpQqPFhjMqnQpTT3fVxTlN7XAL2 QSUVxddX4gXuJQ5GeW4P9Ab4pTZlSqUoQWFVFJRd+vdx9VM84EUNkLgQeomUDEK5GGl1 EgrqqN8HAfiGnMP2xV8XMZgId63oEU5EhE8TunWv+Mipov2M6Y2YG/F/F1QvAXydTJKL F0gI/quFQ4Y3gJ3rV4a54Vi57zxSLOUnrc08QQbuWQO96jlFkSzS+Wxk1qSV5OWysmaD eF0y7WFMFd4XJPhk3th+HHjXJs0YRW8qlQpC+q0I49wFDq3J6zhRDysYZt0LrHVzfTMX PKpw== X-Gm-Message-State: AOAM531i+fvv/NXjvmI8f+VnNGk4muABIStkaK6AORI1BYhJ2tlvctOW DrMi17fspVPhknZTnPinZR2yFg== X-Received: by 2002:a17:902:9887:b0:151:6e1c:7082 with SMTP id s7-20020a170902988700b001516e1c7082mr20228734plp.162.1652187037457; Tue, 10 May 2022 05:50:37 -0700 (PDT) Received: from [192.168.1.100] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id ot17-20020a17090b3b5100b001dc4d22c0a7sm1719430pjb.10.2022.05.10.05.50.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 May 2022 05:50:37 -0700 (PDT) Message-ID: <1afd2c01-69b3-ab8f-6bfe-118e3e56001c@kernel.dk> Date: Tue, 10 May 2022 06:50:35 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [RFC PATCH 0/2] sbitmap: NUMA node spreading Content-Language: en-US To: John Garry , linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org References: <1652181274-136198-1-git-send-email-john.garry@huawei.com> From: Jens Axboe In-Reply-To: <1652181274-136198-1-git-send-email-john.garry@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/10/22 5:14 AM, John Garry wrote: > Hi Jens, guys, > > I am sending this as an RFC to see if there is any future in it or ideas > on how to make better. I also need to improve some items (as mentioned in > 2/2 commit message) and test a lot more. > > The general idea is that we change from allocating a single array of > sbitmap words to allocating an sub-array per NUMA node. And then each CPU > in that node is hinted to use that sub-array > > Initial performance looks decent. > > Some figures: > System: 4-nodes (with memory on all nodes), 128 CPUs > > null blk config block: > 20 devs, submit_queues=NR_CPUS, shared_tags, shared_tag_bitmap, > hw_queue_depth=256 > > fio config: > bs=4096, iodepth=128, numjobs=10, cpus_allowed_policy=split, rw=read, > ioscheduler=none > > Before: > 7130K > > After: > 7630K > > So a +7% IOPS gain. What does the comparison run on a non-NUMA non-shared queue look like? Because I bet it'd be slower. To be honest, I don't like this approach at all. It makes the normal case quite a bit slower by having an extra layer of indirection for the word, that's quite a bit of extra cost. It doesn't seem like a good approach for the issue, as it pessimizes the normal fast case. Spreading the memory out does probably make sense, but we need to retain the fast normal case. Making sbitmap support both, selected at init time, would be far more likely to be acceptable imho. -- Jens Axboe