From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751724AbdITO0c (ORCPT ); Wed, 20 Sep 2017 10:26:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38890 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550AbdITO0a (ORCPT ); Wed, 20 Sep 2017 10:26:30 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4A86F7E445 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eric.auger@redhat.com Subject: Re: [PATCH] vfio/pci: Virtualize Maximum Payload Size To: Sinan Kaya , Alex Williamson References: <20170919164952.13200.78849.stgit@gimli.home> <20170919142024.05723289@t450s.home> <3dd92928-3cda-50c1-6a67-10721c003c10@redhat.com> Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, jcm@redhat.com, "linux-pci@vger.kernel.org" From: Auger Eric Message-ID: <73d55003-6fcd-3741-73a1-365c73933538@redhat.com> Date: Wed, 20 Sep 2017 16:26:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 20 Sep 2017 14:26:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sinan, On 20/09/2017 15:01, Sinan Kaya wrote: > On 9/20/2017 3:59 AM, Auger Eric wrote: >>> My impression is that MRRS is predominantly device and driver >>> dependent, not topology dependent. A device can send a read request >>> with a size larger than MPS, which implies that the device supplying >>> the read data would split it into multiple TLPs based on MPS. >> I read that too on the net. However in in 6.3.4.1. (3.0. Nov 10), Rules >> for SW Configuration it is written: >> "Software must set Max_Read_Request_Size of an isochronous-configured >> device with a value that does not exceed the Max_Payload_Size set for >> the device." >> >> But on the the other hand some drivers are setting the MMRS directly >> without further checking the MPS? > > We discussed this on LPC. MRRS and MPS are two independent concepts and > are not related to each other under normal circumstances. > > The only valid criteria is that MRRS needs to be a multiple of MPS. > > https://linuxplumbersconf.org/2017/ocw//system/presentations/4732/original/crs.pdf > > Because completions are required to be a minimum of MPS size. If MRRS > MPS, > read response is sent as multiple completions. With that patch, you can end up with MRRS < MPS. Do I understand correctly this is an issue? Thanks Eric > > The only reason you want to match MRRS==MPS is that you don't want a single > device to hog system resources. You can have MRRS 4k and MPS 128 bytes. Completions > come in as 128 x N packets on the PCI bus. > > If you are sharing the same PCI bus with some other device, switch; you are effectively > stalling other devices. That's why, isochronous devices are requesting small MRRS. > > An Isochronous device is an exception not norm. >