From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752853AbdBPBez (ORCPT ); Wed, 15 Feb 2017 20:34:55 -0500 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:25791 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751443AbdBPBex (ORCPT ); Wed, 15 Feb 2017 20:34:53 -0500 X-Greylist: delayed 75099 seconds by postgrey-1.27 at vger.kernel.org; Wed, 15 Feb 2017 20:34:53 EST X-RM-TRANSID: 2ee558a501b08e6-b1d61 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee458a501af860-991c6 Subject: Re: [PATCH] uio: add UIO_MEM_CUSTOM support To: Greg KH References: <1487133786-25545-1-git-send-email-lixiubo@cmss.chinamobile.com> <20170215171937.GA4705@kroah.com> Cc: agrover@redhat.com, mchristi@redhat.com, namei.unix@gmail.com, linux-kernel@vger.kernel.org From: Xiubo Li Message-ID: Date: Thu, 16 Feb 2017 09:34:43 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170215171937.GA4705@kroah.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c >> index fba021f..6ca0ae0 100644 >> --- a/drivers/uio/uio.c >> +++ b/drivers/uio/uio.c >> @@ -708,6 +708,8 @@ static int uio_mmap(struct file *filep, struct vm_area_struct *vma) >> case UIO_MEM_LOGICAL: >> case UIO_MEM_VIRTUAL: >> return uio_mmap_logical(vma); >> + case UIO_MEM_CUSTOM: >> + return 0; > How does this help? For example, the TCMU will use the map area as ISCSI commands & data ring buffer(uio0 --> map0). Currently the TCMU will using the fixed small size map area as the ring buffer, but this will be the bottleneck for high iops. Without knowing how large it is enough, so the new scheme will use the fixed small ring buffer area(about 64M ~ 128M) + dynamically "growing" ring buffer area(about 1.5G). The fixed small area will be using vmalloc() when initializing, and dynamically "growing" area will must use kmalloc() for some reasons. ... > Can you provide an update to the documentation in > Documentation/driver-api/uio-howto.rst to show how to use this? Yes, I will update this. Thanks. BRs Xiubo > thanks, > > greg k-h