Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1463970pxb; Fri, 21 Jan 2022 19:54:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrQtrUZGC7vv+pbSR0jn/P4/rdH7Oig4zxVj7rlr1vl5/FcboRbkc/EYk2HEELYyzBfPVe X-Received: by 2002:a17:902:c713:b0:14b:d31:f9cd with SMTP id p19-20020a170902c71300b0014b0d31f9cdmr6555088plp.29.1642823685152; Fri, 21 Jan 2022 19:54:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642823685; cv=none; d=google.com; s=arc-20160816; b=fKSkocyC9ZrX60OtG8OWsoD8kH1bYNRlu6DXYMTLPSxKyhmSPwty/0vDH+ienO4gUG zfiThwuJq5aSYwuh88zYGuiocSkd+3tCYDcCT2JNOVgVy5tdsMlbaFePD7+zrcvKls/w PVz+vUwMjTSSPyriqKXE8qEFWha8D5bM3eEoow00G6EfdvltW2VqiMN/+SR2Xk8OXIzk u0zP3qGS1ZJQpn90H4ACVzrPsH1NeTcWm58bSQqaz5roj31okJ9U5atOnXhNY3SZOdYK yh7zsHhPW2dfAgXv1dYAUNQFUEKQGbeq5Q+MOFEw09TPGvp1g107be9Tl5f3goYplsAU LWew== 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 :message-id:subject:cc:to:from:date:dkim-signature; bh=PxUfi5oyIkxYf2iZMeHvEP36jDDr3llPjsSG8iRKX6Y=; b=cWeplvHXn204YN4DbVF6qAzWRZ5zDG1phLDZw3G/WQhfoovZCQXjjOJ1DXvj5jFrbg pERKs1pqDaYox+FxLI7ViDEXQiAu4pBDP0lq8MQ/ZIXwnrnpTA5XKflkIdixXOfmCTMy POo+DAgfcPRDdL61vcH9fJtGXnWdeReJcaBnsdwSQwMsM6bLwzyPjpcphAfMoi4aTJbn BY19RjFPGFLQvfEcwkFGjggN9YDH4/bdb8dk7JsTCGKsRlTrRVj1xLvYFzmFmv3RUG5R 3m4EuLrgXYbPKJfh+DjmXYWBpSQ/KmCmN50FeHS2Ko91cT4QnKjzJswYL7BfqGRernVk FhGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=koGUGM9d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j28si8216384pgb.379.2022.01.21.19.54.33; Fri, 21 Jan 2022 19:54:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=koGUGM9d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230389AbiAUTml (ORCPT + 99 others); Fri, 21 Jan 2022 14:42:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbiAUTmk (ORCPT ); Fri, 21 Jan 2022 14:42:40 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16DF2C06173B; Fri, 21 Jan 2022 11:42:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 31381B820D9; Fri, 21 Jan 2022 19:42:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92A24C340E1; Fri, 21 Jan 2022 19:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642794156; bh=y3jRqlHbQrLoqnRKvkQrFt1UTEygR3vigrCRGd78NTE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=koGUGM9dMqab8ZM1HidFSVpf+SYOfdqbOH4VAo9fefsKghGZHqpBobNxS4MtvOYsy F7QHrdkwI99ckCvaVCFo3iVozCAuE8xwFMXgUzoq/0+8kt2DpNkcA+sjlPHIoWa4cI X5cDNzSVsWjj6bXdEDVkMdumjWlJZriZBw4ejQlo9eucFAjRu4rkNqGHPlN65dmafM Tad3WgLEys8LheMcMI4yDpUVw8x7IcTvRV6qIFSJ+hJzg5JLw873gG4eUZ+XqoC9nJ Zr4Q4hvXE/Lu0phy5XrJwmvqQjmqvBdQogkeGmgizxb+F84c52lOcksCY0FcPtGw6q EGnKBQhiReHYQ== Date: Fri, 21 Jan 2022 13:42:35 -0600 From: Bjorn Helgaas To: Vikash Bansal Cc: Greg KH , "bhelgaas@google.com" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Srivatsa Bhat , "srivatsa@csail.mit.edu" , Alexey Makhalov , Srinidhi Rao , Anish Swaminathan , Vasavi Sirnapalli , Ajay Kaher Subject: Re: [PATCH] PCI: Speed up device init by parsing capabilities all at once Message-ID: <20220121194235.GA1146009@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7E2C2648-76CE-4987-AB4F-7B4576F10D7B@vmware.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 21, 2022 at 05:26:35PM +0000, Vikash Bansal wrote: > On 20/01/22, 11:56 AM, "Greg KH" wrote: > > Run pahole for pci_dev structure, it is not adding any padding bytes. > Please refer to my previous email for replies to Greg's other comments. Please don't indent your entire response. The original posting apparently didn't go to linux-pci@vger.kernel.org or was rejected, maybe because it wasn't plain text (see http://vger.kernel.org/majordomo-info.html)? It doesn't appear in the thread at https://lore.kernel.org/all/7E2C2648-76CE-4987-AB4F-7B4576F10D7B@vmware.com/ > >On Tue, Jan 18, 2022 at 09:16:01AM -0800, Vikash Bansal wrote: > >> In the current implementation, the PCI capability list is parsed from > >> the beginning to find each capability, which results in a large number > >> of redundant PCI reads. > >> > >> Instead, we can parse the complete list just once, store it in the > >> pci_dev structure, and get the offset of each capability directly from > >> the pci_dev structure. > ...