From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752374AbdGAVHe (ORCPT ); Sat, 1 Jul 2017 17:07:34 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:47076 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752052AbdGAVHd (ORCPT ); Sat, 1 Jul 2017 17:07:33 -0400 To: John Garry Cc: , , , , , Xiaofei Tan Subject: Re: [PATCH v2] scsi: hisi_sas: optimise DMA slot memory From: "Martin K. Petersen" Organization: Oracle Corporation References: <1498741334-171060-1-git-send-email-john.garry@huawei.com> Date: Sat, 01 Jul 2017 17:07:22 -0400 In-Reply-To: <1498741334-171060-1-git-send-email-john.garry@huawei.com> (John Garry's message of "Thu, 29 Jun 2017 21:02:14 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org John, > Currently we allocate 3 sets of DMA memories from separate > pools for each slot. This is inefficient in terms of memory usage > (buffers are less than 1 page in size, so we lose due to alignment), > and also time spent in doing 3 allocations + de-allocations per slot, > instead of 1. > > To optimise, combine the 3 DMA buffers into a single buffer from a > single pool. Applied to 4.13/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering