Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3056200rwb; Mon, 16 Jan 2023 03:10:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXt3YjsQWL/05kqMDe75e0s0Ux4P95ZXSKJGmDwmrkBpk72o65YNJrar7FCXCa8y9pttiake X-Received: by 2002:a17:90a:5581:b0:229:8e0c:68b0 with SMTP id c1-20020a17090a558100b002298e0c68b0mr586686pji.19.1673867427317; Mon, 16 Jan 2023 03:10:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673867427; cv=none; d=google.com; s=arc-20160816; b=SFgE5vYTwyFSDeQJpQCfOpQ04SlOZ/rk36xChdnOFEzH8EMiXuQmOLTHa/aXJn6LtL 9Vvu0rf6pms14P4/ZU+58/RZfTydSvQORtP9iHhNqV2ygqJtY8R8FiED/tmX0f5O45Vk Cga1C1RIZmw0RyQfRsS35jt0HtmCkRPKKeBC66vg03Hr0rqrO53RvRc6RHXE3q2aflKu g6J+K8jQC5rjBu787zrVq9PHFqtw4edyz19GD7nf1093CPiU4LvzNsA4jefKZBM+qdNJ XcAmIs0YeGcnSiqA3sAA/5SeEPB+Li3ujONuggUTmtmXe8EwiI/S8fT09Vomzbnb5kPc udzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=g2Y8Hyy1qGfYvpvlZgj3RwxUf0h6wITV/LjTSjDumDI=; b=wmP0EoXq9L55/P779/0wliIP1NGYKHii5x0HCS2VfQO/nQwuVpqjWK1fGNSFiqGvk9 NlC+MYl8pQRSxU0lAMdaevdrxXdsW8uTRF0mcKC3Sm9nuWp7oYuTxxZaAeSyeSV+AEPz btnf/WdVWJHg98i2AJhpu2MdJYHXgePPzB0gfSFV7nnIMX6IMr+fZ9+OC4ucqRQZNFyK 9c/3/nnNgsvd8vjPr1uRyesHAN5VXNi8lZIjQx8Cx6S4zFjM60a4OY3uD6noccISgy8r RbrfLkXtPR8kDDODgtwCCgPKbHUrSa93OM5roPXc11UL5sIFup3mn2QauNj9S85tH34c 72bQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s123-20020a637781000000b004cd19aa8c32si3113727pgc.176.2023.01.16.03.10.20; Mon, 16 Jan 2023 03:10:27 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230369AbjAPKwy (ORCPT + 51 others); Mon, 16 Jan 2023 05:52:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbjAPKwv (ORCPT ); Mon, 16 Jan 2023 05:52:51 -0500 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85205193CC; Mon, 16 Jan 2023 02:52:49 -0800 (PST) Received: by mail-ed1-f42.google.com with SMTP id s3so2004277edd.4; Mon, 16 Jan 2023 02:52:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=g2Y8Hyy1qGfYvpvlZgj3RwxUf0h6wITV/LjTSjDumDI=; b=5FqrJjskZ6z0QaRByn0dHgng5hWK2awZPVWTLSYEGSoA0Pyh1fHGk6c8QPKnsAp26Y xXiIO/riSD7e8lujZzAMGXZONBD+BNrZGHseGaY8/vYyZbJeEpbgcjCz4tYNGR683m19 /x3dJh5eTBaq/khcqz/7HknPCEbSOX0TlVSpSm3q394uvDSYaIMqmCduU8smcuod0NUX 68IGH+RqgeeLH6gVhzvAt/ENnWHKLzgcIPob2jmxYi7tamX5FCyTpErj2vo7eIDzl2+M 4Q+tWWxW4+jvqnB5Bj5HIyB1E64BgPL5hc5wCeKr/fvyOoTVFgFzutXGmGj7EQ7JF1Zn jnLg== X-Gm-Message-State: AFqh2kqagJVBn6cpBsn/rRoIE5nD8S7bIRsNqvXUM1jQMhfvRcnhwcni J7qMMbsbPfHOBuA13uUEgMtHafc/kQ0= X-Received: by 2002:a05:6402:371b:b0:48e:c0c3:796f with SMTP id ek27-20020a056402371b00b0048ec0c3796fmr42629082edb.28.1673866368032; Mon, 16 Jan 2023 02:52:48 -0800 (PST) Received: from gmail.com (fwdproxy-cln-006.fbsv.net. [2a03:2880:31ff:6::face:b00c]) by smtp.gmail.com with ESMTPSA id j2-20020aa7de82000000b004972644b19fsm11069955edv.16.2023.01.16.02.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 02:52:47 -0800 (PST) Date: Mon, 16 Jan 2023 02:52:41 -0800 From: Breno Leitao To: Gabriel Krisman Bertazi Cc: asml.silence@gmail.com, dylany@meta.com, axboe@kernel.dk, io-uring@vger.kernel.org, leit@fb.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] io_uring: Split io_issue_def struct Message-ID: References: <20230112144411.2624698-1-leitao@debian.org> <20230112144411.2624698-2-leitao@debian.org> <87v8lbcwz9.fsf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87v8lbcwz9.fsf@suse.de> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Thu, Jan 12, 2023 at 05:35:22PM -0300, Gabriel Krisman Bertazi wrote: > Breno Leitao writes: > > > This patch removes some "cold" fields from `struct io_issue_def`. > > > > The plan is to keep only highly used fields into `struct io_issue_def`, so, > > it may be hot in the cache. The hot fields are basically all the bitfields > > and the callback functions for .issue and .prep. > > > > The other less frequently used fields are now located in a secondary and > > cold struct, called `io_cold_def`. > > > > This is the size for the structs: > > > > Before: io_issue_def = 56 bytes > > After: io_issue_def = 24 bytes; io_cold_def = 40 bytes > > Does this change have an observable impact in run time? Did it show > a significant decrease of dcache misses? I haven't tested it. I expect it might be hard to came up with such test. A possible test might be running io_uring heavy tests, while adding enough memory pressure. Doing this in two different instant (A/B test), might be a unpredicable and the error deviation might hide the benefit.