Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15636114rwd; Sun, 25 Jun 2023 22:12:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6cv7VR/ujLZY1YeAQPwxHQgG6jJh2z7tX/2O88lCnhk2T6U2bbzuNE5PRsD9zWmmFf+Z1P X-Received: by 2002:a17:902:ce83:b0:1b6:a99b:cebb with SMTP id f3-20020a170902ce8300b001b6a99bcebbmr7584300plg.33.1687756369998; Sun, 25 Jun 2023 22:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687756369; cv=none; d=google.com; s=arc-20160816; b=D0+jT7iLptZSvD93oEXtHNP6jnKI4UHGlap6RhfZ+eaXZy3UhAHYI/sRzYyKPKe+f7 EFu8SVlJswUCxJl8z4QVMTc4SX4WoUyh56iYDg8w+EEjdbkpQ2EuDI4rhloDSiLFWDXT TbtEB+eCG8SROh5Wk3AMuY6XD4VSD4XesMwid/wgPbubJpIVxJmPtlqf9bLJwUDUNBk5 eAKpeNlxBs3onLObgFmuh1SevbXpCDU2Vl9s9iU3fx1+pCcCxyd/iJTOmyt3w85OdOW7 994ho4psvjG+bwuFI9Fn3vG65NSwOo21RanvNAPZT6ydoS+z22+Srbd/VbnOeRQ12oAq rdzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=JXf0Q/S3gf4ovedHaky94f5Srw5Lfa2v9EFqdiD33dU=; fh=s+7/nupwQZ4a1QHaVvuQwq8RXVZrSOTBv0qS15WToQk=; b=HcJ6wf8VLGpOfCpEHNYxkWbKLxnHNnsR25ldGxy3f+lgMpzI81+YrMj/9CZiVukocK uLKG0ZEYDisY2awQuJnCOlSa0OHoRx6y9tBBz10zjuKqw+JTIVq533fxnLsqTjS9gTOm bTeG2HyxEwgFTra1OjCPraqUlrrKPiH9ji/M6DlIr3vay92gNRmA9IOuwaQqXl23XTqu +HLpdbc55t4Yt4JDbRBXTiUgCgozxHX6tFADh64XIJ7Ztcq2xQJ8rP8nREPN5M7zIvzg 9yQWfVI5R3JXEuozDPMKvJ0R+AQ/VJ3r5v5LFZnVSgJjF4zgOt5MQcWGpoCOZofbXX58 XMdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="Mbcyg0M/"; 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=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 71-20020a63024a000000b0055acbe61853si2234821pgc.430.2023.06.25.22.12.38; Sun, 25 Jun 2023 22:12:49 -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=@linux.dev header.s=key1 header.b="Mbcyg0M/"; 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=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229457AbjFZFGC (ORCPT + 99 others); Mon, 26 Jun 2023 01:06:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjFZFGA (ORCPT ); Mon, 26 Jun 2023 01:06:00 -0400 Received: from out-62.mta0.migadu.com (out-62.mta0.migadu.com [91.218.175.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDFC6FF for ; Sun, 25 Jun 2023 22:05:58 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1687755955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=JXf0Q/S3gf4ovedHaky94f5Srw5Lfa2v9EFqdiD33dU=; b=Mbcyg0M/BOvzWY5DvqihhLj92CfaSJPrcEF6ovbhqH+GzwFzS9cGIaSIh8ruYrjCBz/WFm rvCiNgcBAJ2IvvylKyFwGEGKtVRh1it5h4ohkBR5i+FsuDrTFaaATUBahmbDSjd6MtBmVQ IrN7UDIdg4huRlP4MV3u5mjGuYXVavY= From: chengming.zhou@linux.dev To: axboe@kernel.dk, tj@kernel.org Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, zhouchengming@bytedance.com Subject: [PATCH v2 0/3] blk-mq: fix start_time_ns and alloc_time_ns for pre-allocated rq Date: Mon, 26 Jun 2023 13:04:02 +0800 Message-Id: <20230626050405.781253-1-chengming.zhou@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 From: Chengming Zhou Hello, This patchset is the updated version of [1], which fix start_time_ns and alloc_time_ns for pre-allocated rq. patch 1 and 2 is preparation that we ktime_get_ns() only once for batched requests start_time_ns setting. patch 3 is the fix patch that we set alloc_time_ns and start_time_ns to now when the pre-allocated rq is actually used. [1] https://lore.kernel.org/all/20230601053919.3639954-1-chengming.zhou@linux.dev/ Chengming Zhou (3): blk-mq: always use __blk_mq_alloc_requests() to alloc and init rq blk-mq: ktime_get_ns() only once for batched requests init blk-mq: fix start_time_ns and alloc_time_ns for pre-allocated rq block/blk-mq.c | 89 ++++++++++++++++++++++++------------------ include/linux/blk-mq.h | 6 +-- 2 files changed, 55 insertions(+), 40 deletions(-) -- 2.39.2