Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp489997ybn; Thu, 3 Oct 2019 07:59:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNgl6HcxdyRO3dDtLkUeaOL8s3NHOtcWqSXhULOba1M64YG8vCE9MeepeBg0dtcVt6p0Jt X-Received: by 2002:a50:a0e2:: with SMTP id 89mr9862232edo.118.1570114749012; Thu, 03 Oct 2019 07:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570114749; cv=none; d=google.com; s=arc-20160816; b=yOaO3wSelKFDJkyiE+xUl6Tgi/B2xkYM3uBkYYcWEuBM24eCkIEEr8y1cn9366Siol ld8ZRhmxBEpH88/6UuVlLzeQXSDfQ3U+jmtG0WuNjVCA3ssXOky9XLp87rzZARlAAC4t rsLSNKufy4prh0GdqJJaqAMeej4hDITx9VtJZxdIVb97Nd6Z+Qx6ZRSiw7COPXRQIPYX 4957hIesC9JdOsWaUnWo3I/tn0ywDVL4oCuM5lB/qq4dKIYzpYOyAN2/6kjpkRurZDrx KH3AyOvepx5sur3gepeeohyKpWj1cux3Z4IQDvom3658gP62Ndwp4SeefIsNpg4RDjqA HnLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=V3BR9F8aqsjZnQsqhqhOQjBxvidnv8ceqAJIifPiUoE=; b=Luf9AXMZ9yoSmdvexmOKRRMWNq+FWFfVM3XumbBCgnRzEBwVChYAkfrzpRHiV0bcEz AFCQpYGlOyLwM2wJCaJvlzLPtyqhd40mJDg0InVaIZ53XRhBMLSPgn5Bk0n6w1A1JuQ7 LnCp05zhrU/5eeB/zPCsJ0pppkodYQOeY3+bldB56asyhubfqI1HS8VtH70biuQCi9MY WED4ecTf4HoGPdaLCWDhdEQpj/dyihrO3angZBTDcoo7iJGE/O82KqHkU+XdepMd5bPE pyfCotVa2fIZyuUlOWrgS8vlDdLSI6kjAZ8V+S8TQYIVZp4CB9eQ6VaxNZkjnGGsHp/H WiHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dell.com header.s=smtpout1 header.b=ERRPzXlL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si1364745ejh.281.2019.10.03.07.58.44; Thu, 03 Oct 2019 07:59:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@dell.com header.s=smtpout1 header.b=ERRPzXlL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730307AbfJCOlQ (ORCPT + 99 others); Thu, 3 Oct 2019 10:41:16 -0400 Received: from mx0a-00154904.pphosted.com ([148.163.133.20]:14348 "EHLO mx0a-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729951AbfJCOlQ (ORCPT ); Thu, 3 Oct 2019 10:41:16 -0400 Received: from pps.filterd (m0170393.ppops.net [127.0.0.1]) by mx0a-00154904.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x93Ee6VL012477; Thu, 3 Oct 2019 10:41:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=smtpout1; bh=V3BR9F8aqsjZnQsqhqhOQjBxvidnv8ceqAJIifPiUoE=; b=ERRPzXlLY4u0/LGIVNRbE+xSRivcyhxE4ZJUfh4j+3oQDryBP5KzRtm/h/vhM8mpzmpJ v2QNk/MbP6yzvcH0OW6DzRzK8Eb+bBcf5HeIC8akZYDK+OZ2WyUd2YiAQ+l/Uo0bZ1Zk U5qzsYf9lAkHUHxRvHy9eOZTUH/m5pzaZIIaVeZ2Vw+gwCdixQqWNpWsSO6BMpEYznGZ vYVHJ1i6cK0LdK4h5TWoMqa1DZ0VmU+ZtLBM5KUaEdiWKqMeHVlZSKRHR5k4MT0PPyeu anMuh/GHfTMe83uVRmkdUHuzBxIOJj1M71RMSefrSo4QuccPySApLw7sO+vxLTSzEF8V sg== Received: from mx0b-00154901.pphosted.com (mx0b-00154901.pphosted.com [67.231.157.37]) by mx0a-00154904.pphosted.com with ESMTP id 2va2uk8r2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Oct 2019 10:41:14 -0400 Received: from pps.filterd (m0089483.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x93EcWbj006028; Thu, 3 Oct 2019 10:41:13 -0400 Received: from ausxipps306.us.dell.com (AUSXIPPS306.us.dell.com [143.166.148.156]) by mx0b-00154901.pphosted.com with ESMTP id 2vdb1fw178-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 03 Oct 2019 10:41:13 -0400 X-LoopCount0: from 10.166.132.131 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.60,349,1549951200"; d="scan'208";a="382884374" From: To: CC: , , , , , , , , , , Subject: RE: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 Thread-Topic: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 Thread-Index: AQHVeEzShOhklesInk+gx9St4A7986dGAqiggAATYiCAAUbqgIAAF+AwgABczAD//7D1UIABYeAAgAAaodA= Date: Thu, 3 Oct 2019 14:41:11 +0000 Message-ID: <06a04bff94494da99c5359a7fb645d19@AUSX13MPC105.AMER.DELL.COM> References: <20191001113830.13028-1-mika.westerberg@linux.intel.com> <20191001113830.13028-18-mika.westerberg@linux.intel.com> <184c95fc476146939b240557e54ee2c9@AUSX13MPC105.AMER.DELL.COM> <5357cb96013445d79f5c2016df8a194e@AUSX13MPC105.AMER.DELL.COM> <20191002083913.GG2714@lahna.fi.intel.com> <767f2f97059e4e9f861080672aaa18d3@AUSX13MPC105.AMER.DELL.COM> <20191003080028.GK2819@lahna.fi.intel.com> In-Reply-To: <20191003080028.GK2819@lahna.fi.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Enabled=True; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SiteId=945c199a-83a2-4e80-9f8c-5a91be5752dd; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Owner=Mario_Limonciello@Dell.com; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_SetDate=2019-10-03T14:41:10.3587326Z; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Name=External Public; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Application=Microsoft Azure Information Protection; MSIP_Label_17cb76b2-10b8-4fe1-93d4-2202842406cd_Extended_MSFT_Method=Manual; aiplabel=External Public x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.143.18.86] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-03_05:2019-10-03,2019-10-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 mlxscore=0 spamscore=0 phishscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 mlxlogscore=999 suspectscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1910030137 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 bulkscore=0 clxscore=1015 mlxlogscore=999 priorityscore=1501 lowpriorityscore=0 spamscore=0 malwarescore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1910030137 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Mika Westerberg > Sent: Thursday, October 3, 2019 3:00 AM > To: Limonciello, Mario > Cc: yehezkelshb@gmail.com; linux-usb@vger.kernel.org; > andreas.noever@gmail.com; michael.jamet@intel.com; > rajmohan.mani@intel.com; nicholas.johnson-opensource@outlook.com.au; > lukas@wunner.de; gregkh@linuxfoundation.org; stern@rowland.harvard.edu; > anthony.wong@canonical.com; linux-kernel@vger.kernel.org > Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 >=20 >=20 > [EXTERNAL EMAIL] >=20 > On Wed, Oct 02, 2019 at 04:00:55PM +0000, Mario.Limonciello@dell.com wrot= e: > > > It's not even "same location - another meaning", the vendor ID comes = from > the > > > DROM section, so it takes a few internal jumps inside the NVM to find= the > > > location. One of the "pointers" or section headers will be broken for= sure. > > > > > > And after this, we need to find the NVM in LVFS and it has to pass va= lidation > in > > > a few other locations. The chances are so low that I'd think it isn't= worth > > > worrying about it. > > > > And now I remember why the back of my mind was having this thought of > wanting > > sysfs attribute in the first place. The multiple jumps means that a lo= t more of > the > > NVM has to be dumped to get that data, which slows down fwupd startup > significantly. >=20 > IIRC currently fwupd does two reads of total 128 bytes from the active > NVM. Is that really slowing down fwupd startup significantly? Yeah, I timed it with fwupd. Here's the averages: Without doing the reads to jump to this it's 0:00.06 seconds to probe a tre= e of Host controller and dock plugged in. With doing the reads and just host controller: 0:04.40 seconds With doing the reads and host controller and dock plugged in: 0:10.73 seconds >=20 > > However the kernel has this information handy already from thunderbolt = init > and can > > easily export an attribute which can then come from udev with no startu= p > penalty. >=20 > Indeed kernel has this information but I'm bit hesitant to add new > attributes if that same information is already available to the > userspace rather easily. IMHO we can always add this to the driver later > as we learn new NVM formats that require more parsing from fwupd side > slowing it down considerably. I guess we can wait until new NVM formats come and cross the bridge at that= point. If we encounter a new NVM format that kernel recognizes but old fwupd doesn= 't it will reject it anyway (just the error won't be super clear why).