Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1328975rwl; Fri, 31 Mar 2023 09:34:19 -0700 (PDT) X-Google-Smtp-Source: AKy350Z9hfXCwJ4dKpKmZga1KLhfVgMNsWE//nanKv6Hwl3p0mzY043tinrzW7Z6L0/QmZJifWjQ X-Received: by 2002:a17:906:5307:b0:933:2e79:4632 with SMTP id h7-20020a170906530700b009332e794632mr21808105ejo.1.1680280459705; Fri, 31 Mar 2023 09:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680280459; cv=none; d=google.com; s=arc-20160816; b=MOexpiqWbG8eCuyY2vYyp5YoV8AORmMA5e8ISNsiQGLlAiKol2pEv4Z2To4w3e819P RCauV8WaueuhMwd2EQV3wGx7c3dc74vXEJKXKV3TnYBiBwofBMCFS39qlca2MaA8Yk2x ea11PkrcY1/pQ7HQnJtzI6QDytRJouiTgp+8WDsDHKskKjs20FixOCcELQrlxHI/qKk9 85VUIRdfoRMtRCYP0t0dQH+SVHnyd2+ys80eVdNJLL8Hv7811w1wTnRDdWsyF+9rJVcn iV4jdmM2alL8UxRkmfXAFe18XRNIQTqrZC56XC/uSmBcQ4J58O1VBjY1AroufZ4IomEH 09Lg== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fZ96KdlSjaTBWKPocTxX5k5WrsmRj+TV7Rw8W1wVnGM=; b=usv5xN8S4mghZdg/arLvu4UTSua2Km9hgw912FqpAHhvAqXF8XVL6ufV7Sx0srgWKb sTxjFsgAD/VCFTVIb7h7muHEi8C84s6LyVLiZTznSq2pm0A9BDgfdWFNSKPWLGW2QHV7 y2+A3oFbE3Ww1kP/up59WL5qAgu/Iuw8w01lXKbEAgxTMOG6CGnCjfxeo2wxL3lTFYws 8OrN+bzb/izYyKVTQgMyfL0LRmPNzOetJ7uIn6lQchCV4rAXqHiZXHp5XkVgIkJog68p RaeHQRF3vKJOCJ7YDBYmPWOhrh0OT0FC0pA38X/gB2AQjWdPhGX2uiG8By5MNS+S3Xub kcgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TF0OmCsb; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d21-20020a1709067f1500b0093346a7bf34si2101507ejr.406.2023.03.31.09.33.54; Fri, 31 Mar 2023 09:34:19 -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=@gmail.com header.s=20210112 header.b=TF0OmCsb; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233204AbjCaQ3V (ORCPT + 99 others); Fri, 31 Mar 2023 12:29:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233243AbjCaQ3G (ORCPT ); Fri, 31 Mar 2023 12:29:06 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EC202C9CF; Fri, 31 Mar 2023 09:24:50 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id t10so91607528edd.12; Fri, 31 Mar 2023 09:24:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680279843; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fZ96KdlSjaTBWKPocTxX5k5WrsmRj+TV7Rw8W1wVnGM=; b=TF0OmCsbgoJUYml8K92YWwE+T4riDvgJs28wgP7CjyOsheWLONhapiaZhrEsyp6c3M ePj6RLGqbk2v0OBto7H99YuhEbrHOjoiAGF7R5w3R3JeWOWqLKvtp60PKFEsvN/1Qzg+ mF4+/zjp52PUW1ZdjsEqFi/aSK+bwTf26x//jBzfHuv/jVV8ggWSYOF8sm8M/ImDDVqj EaOZHnfj+6kj7q8hUFJpmprt+xXQw5UJXZNEbRac54Ru69gt18VYjOSgstt+fm0n64PS LLI3H5l7F+Mt+MSfnnc6Qx5S+m/HxQ5ZG2sCU59md16HYHyZMxR4eOv1IprLSCoouE7u OQKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680279843; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fZ96KdlSjaTBWKPocTxX5k5WrsmRj+TV7Rw8W1wVnGM=; b=S8rx9pIVAHC4o5yZYDWum3EfRp5y/aFJVshva5gw0MpiZmNOnm2igdWWJDIkiu+X+U n/bKZLSXTG08eGXozyCFPvsjClTfRH1ByWJzbYBbupbCU5TyOEL666nrovjugYqvlYfs hlbP4L88WNyEgqW1gLaXrme8wpszziq8x2Fb4O6pBXDAuj7i94rnm8fKBBGphaQsyWj6 v4T2R0J4Wix3iK9Dsu5ecQd8wypHlznGeX0CyKPbHbw7FyA6GyDiax+ZbAhsZJBXMhpB nnO4r5U6q6lPk81GQKZbnM/zbOLjJG3t7EEYfjD5p8fRx4lDtaUvGnt8uT7snooOttoV rT4w== X-Gm-Message-State: AAQBX9dV7byw2eUgo1FYtg2LLfd8EFWCQsbYVA5Jl7MtB6wibrEKmMb1 P/a8Z9WybYGwULojHJDcvi8= X-Received: by 2002:a05:6402:10d8:b0:4fb:2296:30b3 with SMTP id p24-20020a05640210d800b004fb229630b3mr26345810edu.15.1680279843125; Fri, 31 Mar 2023 09:24:03 -0700 (PDT) Received: from [192.168.8.100] (188.28.114.40.threembb.co.uk. [188.28.114.40]) by smtp.gmail.com with ESMTPSA id k17-20020a50c091000000b004fa99a22c3bsm1216289edf.61.2023.03.31.09.24.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 31 Mar 2023 09:24:02 -0700 (PDT) Message-ID: Date: Fri, 31 Mar 2023 17:21:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [RFC 00/11] optimise registered buffer/file updates To: Gabriel Krisman Bertazi Cc: io-uring@vger.kernel.org, Jens Axboe , linux-kernel@vger.kernel.org References: <87h6u111te.fsf@suse.de> Content-Language: en-US From: Pavel Begunkov In-Reply-To: <87h6u111te.fsf@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 3/31/23 14:35, Gabriel Krisman Bertazi wrote: > Pavel, > > Pavel Begunkov writes: >> Updating registered files and buffers is a very slow operation, which >> makes it not feasible for workloads with medium update frequencies. >> Rework the underlying rsrc infra for greater performance and lesser >> memory footprint. >> >> The improvement is ~11x for a benchmark updating files in a loop >> (1040K -> 11468K updates / sec). > > Nice. That's a really impressive improvement. > > I've been adding io_uring test cases for automated performance > regression testing with mmtests (open source). I'd love to take a look > at this test case and adapt it to mmtests, so we can pick it up and run > it frequently. > > is it something you can share? I'll post it later. The test is quite stupid and with the patches less than 10% of CPU cycles go to the update machinery (against 90+ w/o), the rest is spend for syscalling, submitting update requests, etc., so it almost hits the limit. Another test we can do is to measure latency b/w the point we asked a rsrc to be removed and when it actually got destroyed/freed, e.g. tags will help with that. It should've been improved nicely as well as it removes the RCU grace period and other bouncing. -- Pavel Begunkov