All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiubo Li <lixiubo@cmss.chinamobile.com>
To: Andy Grover <agrover@redhat.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: Thu, 16 Feb 2017 14:49:40 +0800	[thread overview]
Message-ID: <6e0256fa-6366-229c-c18d-ea8cfb6ef52d@cmss.chinamobile.com> (raw)
In-Reply-To: <01c3f279-813a-cc66-0760-b7c1fbfd6857@redhat.com>


>> 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.
For the driver like TCMU, the UIO_MEM_NONE could be used with
implementing its own ->mmap() magic, instead of adding new
UIO_MEM_CUSTOM. But will the semantic be clearer by using
_CUSTOM instead of _NONE  ?

Thanks,

BRs
Xiubo
> HTH -- Regards -- Andy
>

      parent reply	other threads:[~2017-02-16  6:49 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 ` [PATCH] uio: add UIO_MEM_CUSTOM support Greg KH
2017-02-16  1:34   ` Xiubo Li
2017-02-16  5:01     ` Andy Grover
2017-02-16  5:33       ` Xiubo Li
2017-02-16  6:49       ` Xiubo Li [this message]

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=6e0256fa-6366-229c-c18d-ea8cfb6ef52d@cmss.chinamobile.com \
    --to=lixiubo@cmss.chinamobile.com \
    --cc=agrover@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.