Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1582332

Re: [PATCH] uio: add UIO_MEM_CUSTOM support

From Xiubo Li <lixiubo@cmss.chinamobile.com>
Newsgroups linux.kernel
Subject Re: [PATCH] uio: add UIO_MEM_CUSTOM support
Date 2017-02-16 06:40 +0100
Message-ID <tbmXp-1HS-35@gated-at.bofh.it> (permalink)
References <tbbpm-2OF-41@gated-at.bofh.it> <tbbpm-2OF-39@gated-at.bofh.it> <tbjd7-7Gj-5@gated-at.bofh.it> <tbmul-1tR-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


>> 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 following code is in uio_mmap() in uio.c:
>
> if (idev->info->mmap) {
> 	ret = idev->info->mmap(idev->info, vma);
> 	return ret;

Yes, just missed this return.
> }
>
> switch (idev->info->mem[mi].memtype) {
> 	case UIO_MEM_PHYS:
> 		return uio_mmap_physical(vma);
> 	case UIO_MEM_LOGICAL:
> 	case UIO_MEM_VIRTUAL:
> 		return uio_mmap_logical(vma);
> 	default:
> 		return -EINVAL;
> }
>
> We already have the equivalent of a CUSTOM memtype because TCMU sets the
> info->mmap fn, overriding uio's default handling choices in favor of its
> own.
>
> HTH -- Regards -- Andy
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] uio: add UIO_MEM_CUSTOM support Greg KH <gregkh@linuxfoundation.org> - 2017-02-15 18:20 +0100
  Re: [PATCH] uio: add UIO_MEM_CUSTOM support Xiubo Li <lixiubo@cmss.chinamobile.com> - 2017-02-16 02:40 +0100
    Re: [PATCH] uio: add UIO_MEM_CUSTOM support Andy Grover <agrover@redhat.com> - 2017-02-16 06:10 +0100
      Re: [PATCH] uio: add UIO_MEM_CUSTOM support Xiubo Li <lixiubo@cmss.chinamobile.com> - 2017-02-16 06:40 +0100
      Re: [PATCH] uio: add UIO_MEM_CUSTOM support Xiubo Li <lixiubo@cmss.chinamobile.com> - 2017-02-16 08:00 +0100

csiph-web