Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp174449iob; Mon, 2 May 2022 16:17:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy84nJhNaiO1lWJ+F5OuAgCuN4ktgoqkQgt1Iszb+FjYgdT9wLoe2gwxJY5N+/L39Epd2Nh X-Received: by 2002:a17:90b:30c4:b0:1d8:3395:a158 with SMTP id hi4-20020a17090b30c400b001d83395a158mr1615192pjb.184.1651533452663; Mon, 02 May 2022 16:17:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651533452; cv=none; d=google.com; s=arc-20160816; b=jXD40gGyiL3X247hsM1o+dQR6ca/kEBcscQACAyJ28Bp/ZQxl3Z7DbBbum5huDpd6N IuqqHBVG9Zry5p2ahV/4Gl8+o47Eewt7QMtx8k/x50korPK7IbO2+d5MNSYKywtZnjz/ mH2uBMosBQgu/gRd0RayC7kxUZCuyxZt2blAwDd769kIYPCB7tFhOMN3+0sruyT7CJYd jNOjNnp1eX5QG4aBBKdT43Xj79jYfEL6nKMfE2cGDaBNnHi02nfFJq7cD76nG8pkIfa4 iax5aIovLmGIHALh4srDAxKul74/P7wReHQ/FxNCblKR1K/TAF5UaicpT9Wx0rJ8tcca v1Tw== 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=rbHJXY572fQPlY1/oCQ8lTxni098FTYcSyKejnNxvz8=; b=J8sTEmWRPCJMEDPEjXJsLzLL+FjlIyNNeBKDmgsqgQU/KlrQyr/33uxu0Ofw34RThP Z1SxB+D2+B6aTeZWlmedxYl061Vjj7K4F5+X0b/GCtnikARimEw0taqgovBbJyOjtKYh RWXA58c5IFoS3wI8Kag/uCdg53YqLsls7vy5z6e1xlxCEdDvbzYhNZfxMiBFp/rjV0jO NhrQYx1TpY8h/xJFfm/pxcsHXuCo/iWk2Q9iLTpc7cpCrHs50UcOM47VEX34hckBDdH5 YA1Vpr2r8kzlpi1fi8aldCCYNVvSTiolUyOeQEuHS7XWd5RuyDpcc8TBFBIHhFP9RBEN veyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=QTpcQr+e; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l16-20020a170902f69000b001583a083186si6280716plg.302.2022.05.02.16.17.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 16:17:32 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=QTpcQr+e; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E45F330F49; Mon, 2 May 2022 16:17:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376488AbiD3NP0 (ORCPT + 99 others); Sat, 30 Apr 2022 09:15:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230452AbiD3NPW (ORCPT ); Sat, 30 Apr 2022 09:15:22 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 256096E4D9 for ; Sat, 30 Apr 2022 06:11:59 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id fv2so9257233pjb.4 for ; Sat, 30 Apr 2022 06:11:59 -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=rbHJXY572fQPlY1/oCQ8lTxni098FTYcSyKejnNxvz8=; b=QTpcQr+eFHJeVUB3NWSouQNbGpXHjM9CJjKwBm7FT8MWsvqUMWVojIpivPVnqoTYCQ zDZL07GjYyITVKinpFSM10/BXoZohACn6MV+DOUDtZbAEd9QUa6Xba07D0ph/AdN4SD7 IRTZYq00D94UF5XPHUW0WFFVLsTX3g6qX44Ttk6VVcumew5i7BI/SENp3ctGGlEp6V4E ItTW8HbtJjKuxWmk9FXXGDU8Py6aeL4qwgQf/AUy1CMDXmIwe6zAbg2deEKo3X/I6XWs Um/0quaYaPylB0pDXSPmrAOnQbwxWXQTBemm2D313Vm5u0B38BpitPSP77hhno1IgV1h 07rw== 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=rbHJXY572fQPlY1/oCQ8lTxni098FTYcSyKejnNxvz8=; b=fwfhz3smrwyyHstE0ZLXkcgkwzhWpiLB4XTW72KX3gPdx5UU8E7glvBDIq1F9McI2V o5L2YBVizJxoPoX8bqzO7sbilunK4+rw6lkC+MNxCIWGmzRsiceUTuuFChUoAMMYtm2p aZpFgV984+NQfdv4lbxeuJdo6F55137XgCDGyKPmyML6Rtb3g6VlaTzueikFKrcocXxj QCnMGb9LnQFMH8FdWp5jZaa/FlKpmDrtXhROT3f9WqYIe51QcGW2Gh5EfYuW7fK11AJw DxYoxfuvfGN6w4/qAPcTnhNX8NOQoQbEbFmRhM4MivGVUOjIRhgCUGNsuOA0y2u0i0nH IUJw== X-Gm-Message-State: AOAM5300NwzqMYm8yTe6adewuiHyoRoTtuq0WNsjcsjDRE7vJr20vFaL gNv+byOFyaZOpZ7s6yB2uKz7IA== X-Received: by 2002:a17:90a:7c04:b0:1d7:d7e6:2916 with SMTP id v4-20020a17090a7c0400b001d7d7e62916mr9059401pjf.25.1651324318443; Sat, 30 Apr 2022 06:11:58 -0700 (PDT) Received: from [192.168.1.100] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id mj19-20020a17090b369300b001d29a04d665sm16268718pjb.11.2022.04.30.06.11.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 30 Apr 2022 06:11:57 -0700 (PDT) Message-ID: Date: Sat, 30 Apr 2022 07:11:56 -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 v3 0/9] fixed worker Content-Language: en-US To: Hao Xu , io-uring@vger.kernel.org Cc: Pavel Begunkov , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220429101858.90282-1-haoxu.linux@gmail.com> From: Jens Axboe In-Reply-To: <20220429101858.90282-1-haoxu.linux@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,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 4/29/22 4:18 AM, Hao Xu wrote: > This is the third version of fixed worker implementation. > Wrote a nop test program to test it, 3 fixed-workers VS 3 normal workers. > normal workers: > ./run_nop_wqe.sh nop_wqe_normal 200000 100 3 1-3 > time spent: 10464397 usecs IOPS: 1911242 > time spent: 9610976 usecs IOPS: 2080954 > time spent: 9807361 usecs IOPS: 2039284 > > fixed workers: > ./run_nop_wqe.sh nop_wqe_fixed 200000 100 3 1-3 > time spent: 17314274 usecs IOPS: 1155116 > time spent: 17016942 usecs IOPS: 1175299 > time spent: 17908684 usecs IOPS: 1116776 I saw these numbers in v2 as well, and I have to admit I don't understand them. Because on the surface, it sure looks like the first set of results (labeled "normal") are better than the second "fixed" set. Am I reading them wrong, or did you transpose them? I think this patch series would benefit from a higher level description of what fixed workers mean in this context. How are they different from the existing workers, and why would it improve things. > things to be done: > - Still need some thinking about the work cancellation Can you expand? What are the challenges with fixed workers and cancelation? > - not very sure IO_WORKER_F_EXIT is safe enough on synchronization > - the iowq hash stuff is not compatible with fixed worker for now We might need to extract the hashing out a bit so it's not as tied to the existing implementation. -- Jens Axboe