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


Groups > linux.kernel > #1587240

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

From Xiubo Li <lixiubo@cmss.chinamobile.com>
Newsgroups linux.kernel
Subject Re: [PATCH] target/user: Add daynmic growing data area featuresupport
Date 2017-02-24 03:10 +0100
Message-ID <tedux-1HU-3@gated-at.bofh.it> (permalink)
References <tbN1w-2tF-5@gated-at.bofh.it> <tdM1k-7iJ-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


>> When N is bigger, the ratio will be smaller. If N >= 1, the ratio
>> will be [15/1024, 4/1024), for this the ratio 15 : 1024 will be
>> enough. But maybe some iscsi cmds has no datas, N == 0. So the ratio
>> should be bigger.
>>
>> For now we will increase the data area size to 1G, and the cmd area
>> size to 128M. The tcmu-runner should mmap() about (128M + 1G) when
>> running and the TCMU will dynamically grows the data area from 0 to
>> max 1G size.
> Cool. This is a good approach for an initial patch but this raises
> concerns about efficiently managing kernel memory usage -- the data area
> grows but never shrinks, and total possible usage increases per
> backstore. (What if there are 1000?) Any ideas how we could also improve
> these aspects of the design? (Global TCMU data area usage limit?)
Two ways in my mind:

The first:
How about by setting a threshold cmd(SHRINK cmd), something likes
the PAD cmd, to tell the userspace runner try to shrink the memories?

When the runner get the SHRINK cmd, it will try to remmap uio0's ring
buffer(?). Then the kernel will get chance to shrink the memories....

The second:
Try to extern the data area by using /dev/uio1, we could remmap the
uio1 device when need, so it will be easy to get a chance to shrink the
memories in uio1.

Maybe these are a little ugly, are there other more effective ways ?

Thanks,

BRs
Xiubo


>> The cmd area memory will be allocated through vmalloc(), and the data
>> area's blocks will be allocated individually later when needed.
>>
>>

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


Thread

[PATCH] target/user: Add daynmic growing data area feature support lixiubo@cmss.chinamobile.com - 2017-02-17 10:30 +0100
  Re: [PATCH] target/user: Add daynmic growing data area feature  support Andy Grover <agrover@redhat.com> - 2017-02-22 21:50 +0100
    Re: [PATCH] target/user: Add daynmic growing data area featuresupport Xiubo Li <lixiubo@cmss.chinamobile.com> - 2017-02-24 03:10 +0100
      Re: [PATCH] target/user: Add daynmic growing data area featuresupport Andy Grover <agrover@redhat.com> - 2017-02-24 23:30 +0100
        Re: [PATCH] target/user: Add daynmic growing data area featuresupport Xiubo Li <lixiubo@cmss.chinamobile.com> - 2017-02-27 07:10 +0100
          how to unmap pages in an anonymous mmap? Andy Grover <agrover@redhat.com> - 2017-02-27 20:40 +0100
    Re: [PATCH] target/user: Add daynmic growing data area feature  support Mike Christie <mchristi@redhat.com> - 2017-02-28 04:10 +0100
      Re: [PATCH] target/user: Add daynmic growing data area featuresupport Xiubo Li <lixiubo@cmss.chinamobile.com> - 2017-02-28 10:20 +0100
      Re: [PATCH] target/user: Add daynmic growing data area featuresupport Mike Christie <mchristi@redhat.com> - 2017-02-28 19:50 +0100
        Re: [PATCH] target/user: Add daynmic growing data area featuresupport Xiubo Li <lixiubo@cmss.chinamobile.com> - 2017-03-01 02:30 +0100

csiph-web