From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B6CBC433FE for ; Tue, 12 Oct 2021 11:32:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B0E9610CE for ; Tue, 12 Oct 2021 11:32:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233691AbhJLLej (ORCPT ); Tue, 12 Oct 2021 07:34:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232665AbhJLLej (ORCPT ); Tue, 12 Oct 2021 07:34:39 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC7CFC061570; Tue, 12 Oct 2021 04:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=EFpMWPnFRYbJu5TTSbyEvylYSu8Xeekt3sJgE0dfTk0=; b=XbnHuXbHsg08NTzn/O0vCzkZW3 OyBIY0PGIdoljbmlsvaZ5x6jirLOaOPKyx8FFKrde7FPJPaOT6AIs4R1wRWwFhpl4gzf7FG6VFFhd jRRVcoeR/y5xs1+TW8O0dCza8Lmt9wdVwrSDJH7aJMn4onOr/J2vLl4jHCbjm46zJ0dwvYrNSPh1y DPa3WFQq0LFGMkuZPfGZJgXl0Vr1qlIaT3i/TT2hJGcRDRrrT5wiQFq2he7Woy06GNVl+mEy1sCLJ cEaNQPfAcmY5qsbz8chCXvNZ80gKoIS4YcbddNuMU76AoYaGqF3fNZWFvGZEQhHo0PEmk30XZdIoe 2sNCIzJg==; Received: from [2001:4bb8:199:73c5:f5ed:58c2:719f:d965] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1maFy3-006SIq-Kk; Tue, 12 Oct 2021 11:29:36 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Jeffle Xu , Ming Lei , Damien Le Moal , Keith Busch , Sagi Grimberg , "Wunderlich, Mark" , "Vasudevan, Anil" , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nvme@lists.infradead.org, Hannes Reinecke Subject: [PATCH 13/16] block: define 'struct bvec_iter' as packed Date: Tue, 12 Oct 2021 13:12:23 +0200 Message-Id: <20211012111226.760968-14-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211012111226.760968-1-hch@lst.de> References: <20211012111226.760968-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Ming Lei 'struct bvec_iter' is embedded into 'struct bio', define it as packed so that we can get one extra 4bytes for other uses without expanding bio. 'struct bvec_iter' is often allocated on stack, so making it packed doesn't affect performance. Also I have run io_uring on both nvme/null_blk, and not observe performance effect in this way. Suggested-by: Christoph Hellwig Signed-off-by: Ming Lei Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Tested-by: Mark Wunderlich --- include/linux/bvec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bvec.h b/include/linux/bvec.h index 0e9bdd42dafb6..35c25dff651a5 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h @@ -44,7 +44,7 @@ struct bvec_iter { unsigned int bi_bvec_done; /* number of bytes completed in current bvec */ -}; +} __packed; struct bvec_iter_all { struct bio_vec bv; -- 2.30.2