Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2145486imc; Tue, 12 Mar 2019 07:56:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCckiCFz4XdxG18rlvqKH+mfeVwBS0wTrdjXre46Wy/YvxUUiN5oupXUpb7RgUTQWeT4SJ X-Received: by 2002:a62:4684:: with SMTP id o4mr38928144pfi.254.1552402598205; Tue, 12 Mar 2019 07:56:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552402598; cv=none; d=google.com; s=arc-20160816; b=RN9PbxXtnfIwdO8islVWmAhU+/71++BiRIQoLx2fm3cJaImYErMFosK4PlGVc6Exei HEVpH1jYLBjE97z5xNkzD6Ad4cGaWsyo0VX5XSTay7qAcYc3xPNi5voHp10HDVlw2QXr NxXrHhabhPj+hOxYiYb2xRMbBWuolwRV+VGhIzmIyOppaI0eEN+V2HdQAhfXm4bGno+7 TeYyBkojmYmfxJwAF9KgWNOwq9BQcHdZCMviMLOHY5GQzeECpgbDUAvRrby09c+ejqCP Da5/xueqXLW3rnFwseTAUBtMrD+Q5BHuUuQxqybduwSJ9Z4VLgquNk8wibDvZZjccqps Gw6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Fwe5t0/AOMN3VXAEH0/V5WN8qtQAfffdHbVwFIN/jJQ=; b=ewKIu+Taw5kMwoFVvBWFxf7JRu93qFGOzChS72JSfZZ6MFZOyOA+i1ABiQ+EwzXxTv lP+03ni9sUg8tYc3gHrV7s2gLvNI4FXeOOWv/tPWLayb3Pexkl062eCpnaO/pNHxBU6I Nc/lpwc6m2ff9jfbLWGl0dsc+Q9i5oT7nIhMLH4oXOY+Vdb+UV4lyECoqxZJRKV88pVL LzSxHvYBO12dxqpBRUGk4pZo8jBwIXHuJ2ta0rIes/7Acef+EVllGw4hb3X2footHywF LOHpH/QsCQD1W1avZZ7jjpS0zOQWFrdaSAWoJuuu2B9ocXK8p8Abwwv+o2GZ83IRW0yB 96uA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s33si4847514pgl.184.2019.03.12.07.56.21; Tue, 12 Mar 2019 07:56:38 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726639AbfCLO4A (ORCPT + 99 others); Tue, 12 Mar 2019 10:56:00 -0400 Received: from mga07.intel.com ([134.134.136.100]:54689 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726339AbfCLOz7 (ORCPT ); Tue, 12 Mar 2019 10:55:59 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2019 07:55:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,471,1544515200"; d="scan'208";a="130978116" Received: from djustese-mobl1.ger.corp.intel.com (HELO localhost) ([10.249.254.184]) by fmsmga008.fm.intel.com with ESMTP; 12 Mar 2019 07:55:54 -0700 Date: Tue, 12 Mar 2019 16:55:53 +0200 From: Jarkko Sakkinen To: Calvin Owens Cc: Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] tpm: Make timeout logic simpler and more robust Message-ID: <20190312145553.GB6682@linux.intel.com> References: <358e89ed2b766d51b5f57abf31ab7a925ac63379.1552348123.git.calvinowens@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <358e89ed2b766d51b5f57abf31ab7a925ac63379.1552348123.git.calvinowens@fb.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 11, 2019 at 04:54:04PM -0700, Calvin Owens wrote: > We're having lots of problems with TPM commands timing out, and we're > seeing these problems across lots of different hardware (both v1/v2). > > I instrumented the driver to collect latency data, but I wasn't able to > find any specific timeout to fix: it seems like many of them are too > aggressive. So I tried replacing all the timeout logic with a single > universal long timeout, and found that makes our TPMs 100% reliable. > > Given that this timeout logic is very complex, problematic, and appears > to serve no real purpose, I propose simply deleting all of it. > > Signed-off-by: Calvin Owens In the current form the commit is doing way too much. I would like to consider duration (command-response latency) and timeouts (state change latency) separately. /Jarkko