From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH 03/37] iommu/sva: Manage process address spaces To: Sinan Kaya , "linux-arm-kernel@lists.infradead.org" , "linux-pci@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "devicetree@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" Cc: "joro@8bytes.org" , "robh+dt@kernel.org" , Mark Rutland , Catalin Marinas , Will Deacon , Lorenzo Pieralisi , "hanjun.guo@linaro.org" , Sudeep Holla , "rjw@rjwysocki.net" , "lenb@kernel.org" , Robin Murphy , "bhelgaas@google.com" , "alex.williamson@redhat.com" , "tn@semihalf.com" , "liubo95@huawei.com" , "thunder.leizhen@huawei.com" , "xieyisheng1@huawei.com" , "xuzaibo@huawei.com" , "ilias.apalodimas@linaro.org" , "jonathan.cameron@huawei.com" , "shunyong.yang@hxt-semitech.com" , "nwatters@codeaurora.org" , "jcrouse@codeaurora.org" , "rfranz@cavium.com" , "dwmw2@infradead.org" , "jacob.jun.pan@linux.intel.com" , "yi.l.liu@intel.com" , "ashok.raj@intel.com" , "robdclark@gmail.com" , "christian.koenig@amd.com" , "bharatku@xilinx.com" References: <20180212183352.22730-1-jean-philippe.brucker@arm.com> <20180212183352.22730-4-jean-philippe.brucker@arm.com> <04d4d161-ed72-f6b6-9b94-1d60bd79ef94@codeaurora.org> From: Jean-Philippe Brucker Message-ID: Date: Fri, 13 Apr 2018 11:59:29 +0100 MIME-Version: 1.0 In-Reply-To: <04d4d161-ed72-f6b6-9b94-1d60bd79ef94@codeaurora.org> Content-Type: text/plain; charset=utf-8 Sender: linux-acpi-owner@vger.kernel.org List-ID: On 10/04/18 19:53, Sinan Kaya wrote: > On 2/12/2018 1:33 PM, Jean-Philippe Brucker wrote: >> +static void io_mm_detach_all_locked(struct iommu_bond *bond) >> +{ >> + while (!io_mm_detach_locked(bond)); >> +} >> + > > I don't remember if I mentioned this before or not but I think this loop > needs a little bit relaxation with yield and maybe an informational message > with might help if wait exceeds some time. Right, at the very least we should have a cpu_relax here. I think this bit is going away, though, because I want to lift the possibility of calling bind() for the same dev/mm pair multiple times. It's not useful in my opinion because that call could only be issued by a given driver. Thanks, Jean