From: Andy Grover <agrover@redhat.com>
To: Xiubo Li <lixiubo@cmss.chinamobile.com>,
Greg KH <gregkh@linuxfoundation.org>
Cc: mchristi@redhat.com, namei.unix@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uio: add UIO_MEM_CUSTOM support
Date: Wed, 15 Feb 2017 21:01:52 -0800 [thread overview]
Message-ID: <01c3f279-813a-cc66-0760-b7c1fbfd6857@redhat.com> (raw)
In-Reply-To: <f1ba3de8-d32c-9db7-45de-0e5436277176@cmss.chinamobile.com>
On 02/15/2017 05:34 PM, Xiubo Li wrote:
>>> --- 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 following code is in uio_mmap() in uio.c:
if (idev->info->mmap) {
ret = idev->info->mmap(idev->info, vma);
return ret;
}
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
next prev parent reply other threads:[~2017-02-16 5:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1487133786-25545-1-git-send-email-lixiubo@cmss.chinamobile.com>
2017-02-15 17:19 ` Greg KH
2017-02-16 1:34 ` Xiubo Li
2017-02-16 5:01 ` Andy Grover [this message]
2017-02-16 5:33 ` Xiubo Li
2017-02-16 6:49 ` Xiubo Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01c3f279-813a-cc66-0760-b7c1fbfd6857@redhat.com \
--to=agrover@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lixiubo@cmss.chinamobile.com \
--cc=mchristi@redhat.com \
--cc=namei.unix@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®