From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yong Wu Subject: Re: [PATCH v2] iommu/dma: Map scatterlists more parsimoniously Date: Wed, 30 Dec 2015 09:42:06 +0800 Message-ID: <1451439726.27665.3.camel@mhfsdcap03> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6297533530914261196==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Robin Murphy Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: iommu@lists.linux-foundation.org --===============6297533530914261196== Content-Type: multipart/alternative; boundary="=-Rx0Mlvgrn8asgprt0H2u" --=-Rx0Mlvgrn8asgprt0H2u Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Fri, 2015-11-20 at 10:57 +0000, Robin Murphy wrote: > Whilst blindly assuming the worst case for segment boundaries and > aligning every segment individually is safe from the point of view > of respecting the device's parameters, it is also undeniably a waste > of IOVA space. Futhermore, the knock-on effects of more pages than > necessary being exposed to device access, additional overhead in page > table updates and TLB invalidations, etc., are even more undesirable. > > Improve matters by taking the actual boundary mask into account to > actively detect the cases in which we really do need to adjust a > segment, and avoid wasting space in the remainder. > > Tested-by: Yong Wu > Signed-off-by: Robin Murphy Hi Robin, What's the status of this patch? Could we know whether it will be merged into v4.5? > --- > > Minor change: removed the now-redundant null check on prev, since we no > longer dereference it unconditionally and pad_len is guaranteed to be > zero the first time around. > > drivers/iommu/dma-iommu.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > [...] --=-Rx0Mlvgrn8asgprt0H2u Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit On Fri, 2015-11-20 at 10:57 +0000, Robin Murphy wrote:
Whilst blindly assuming the worst case for segment boundaries and
aligning every segment individually is safe from the point of view
of respecting the device's parameters, it is also undeniably a waste
of IOVA space. Futhermore, the knock-on effects of more pages than
necessary being exposed to device access, additional overhead in page
table updates and TLB invalidations, etc., are even more undesirable.

Improve matters by taking the actual boundary mask into account to
actively detect the cases in which we really do need to adjust a
segment, and avoid wasting space in the remainder.

Tested-by: Yong Wu <yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>

Hi Robin,
    What's the status of this patch? Could we know whether it will be merged into v4.5?
---

Minor change: removed the now-redundant null check on prev, since we no
longer dereference it unconditionally and pad_len is guaranteed to be
zero the first time around.

 drivers/iommu/dma-iommu.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

[...]

--=-Rx0Mlvgrn8asgprt0H2u-- --===============6297533530914261196== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============6297533530914261196==--