Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6662762iob; Wed, 11 May 2022 02:35:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuobeqATXCiH+ondKjKV+v40RyJZ0MhPDzz9jTlRo0daCRfUZRnjlvAW7ewkSZBlOqduTF X-Received: by 2002:a17:90a:f3cb:b0:1d9:62d4:25db with SMTP id ha11-20020a17090af3cb00b001d962d425dbmr4430155pjb.222.1652261716931; Wed, 11 May 2022 02:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652261716; cv=none; d=google.com; s=arc-20160816; b=RVBj1ijLCvE+puFa6k1DSjLkAHq/JqJ9i5Aifp41J9fZ68vNfhc/NTv6yNHFIsZgOe /HTpMBdiTVcbYOPYhhHAd/XVlxRbfp8Gz+OmrIlDjX7hVqzpPaGMw60op2e/QuIQJ2kB eUCJ2N6nCM429ycHkxoeOfRj2kToWlb4MXps00zt7wDD2Uhero+0WTlfGFuY26hkPbks iKJEunMLYLPF1Drm0IRa/11Mi1XCYM0is830+2WBZtuTc0q6Jlu1sJQi42ytI9tKiTjb iz3Y6tJ+32TjdTKlHONnUtMvgE3n4RTYGt4GII6f1NUsBbLDr4EmeQa5Tk1R7bvjvS4d JoZQ== 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:references :cc:to:subject:from:user-agent:mime-version:date:message-id; bh=9VjGaiO8ZKjLepxletay5x/ssnJssOs2S3nEcJkNHyk=; b=G6cWZLe6WNihRa1FqKTbjOvmt3vuXOmrj1DtpaDWdQb4daKtEN/lTcMiz9o5wjCY8C G7n7aIFtNgh62JDvmfds4KRW8eDtPwYekpVLYgOFljqOB68kwcpf+mKCl8Kuy7ZWRmod dyfbEhpsSJ5skuLhUp/RA+wbFaYKzO7HRRtXsN/fWirOQC9dBwaonk0bH+CigJPQUVfk glYANcCaex1s5eppbg+0w52nLCDJYk04u4kXsBqvnHLvvoBjfDQAFNlN9wqKk/F/aJZi nDBhWEpy0+ENmaPvhXeAJriJKkiX9ZSAQAXYFCrrg3rAf2rAmYNP9qsQ7KxVCAFbnAdh 15wA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a637a48000000b00399f81e320esi2175002pgn.620.2022.05.11.02.35.03; Wed, 11 May 2022 02:35: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; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344432AbiEJOfI (ORCPT + 99 others); Tue, 10 May 2022 10:35:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245481AbiEJOJ1 (ORCPT ); Tue, 10 May 2022 10:09:27 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C76D326EC; Tue, 10 May 2022 06:44:39 -0700 (PDT) Received: from fraeml713-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KyK2d3mmXz67xBy; Tue, 10 May 2022 21:41:45 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml713-chm.china.huawei.com (10.206.15.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 10 May 2022 15:44:36 +0200 Received: from [10.47.91.186] (10.47.91.186) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2375.24; Tue, 10 May 2022 14:44:36 +0100 Message-ID: <9ede7211-ae58-5cd4-4cf6-74c1f508f1a6@huawei.com> Date: Tue, 10 May 2022 14:44:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 From: John Garry Subject: Re: [RFC PATCH 0/2] sbitmap: NUMA node spreading To: Jens Axboe , CC: , References: <1652181274-136198-1-git-send-email-john.garry@huawei.com> <1afd2c01-69b3-ab8f-6bfe-118e3e56001c@kernel.dk> In-Reply-To: <1afd2c01-69b3-ab8f-6bfe-118e3e56001c@kernel.dk> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.91.186] X-ClientProxiedBy: lhreml705-chm.china.huawei.com (10.201.108.54) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 10/05/2022 13:50, Jens Axboe wrote: >> 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. Thanks for having a look. > What does the comparison run on a non-NUMA non-shared queue look like? > Because I bet it'd be slower. I could test more to get a solid result for that. > > 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. Yes, there is the extra load. I would hope that there would be a low cost, but I agree that we still want to avoid it. So prob no point in testing this more. > 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. I wanted to keep the code changes minimal for an initial RFC to test the water. My original approach did not introduce the extra load for normal path and had some init time selection for a normal word map vs numa word map, but the code grew and became somewhat unmanageable. I'll revisit it to see how to improve that. Cheers, john