All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiubo Li <lixiubo@cmss.chinamobile.com>
To: Andy Grover <agrover@redhat.com>,
	nab@linux-iscsi.org, mchristi@redhat.com, shli@kernel.org
Cc: hch@lst.de, sheng@yasker.org, namei.unix@gmail.com,
	bart.vanassche@sandisk.com, linux-scsi@vger.kernel.org,
	target-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jianfei Hu <hujianfei@cmss.chinamobile.com>
Subject: Re: [PATCH] target/user: Add daynmic growing data area featuresupport
Date: Wed, 1 Mar 2017 18:53:23 +0800	[thread overview]
Message-ID: <770ba3ff-5075-8673-d53b-f6feda0fdc28@cmss.chinamobile.com> (raw)
In-Reply-To: <09891673-0d95-8b66-ddce-0ace7aea43d1@redhat.com>



>> 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?)

Sorry for misunderstanding about this on my part before.

If we couldn't get a feasible way from mm to deal with the memories
shrinking. Maybe a global TCMU data area usage limit is a good choice:

We can limit the global physical data area size to 2G as default, and export
one sysfs to configure this as needed(such as 10G size with possible 1000
targets).

Then use one global radix tree to manage all the 2G physical pages(will grow
from 0 to 2G). Each ring buffer will search it's own data area bitmaps, and
if the current block is reusing, then we should get the old page, which has
already mapped to the runner process, from the global radix tree, or should
we get one new page(from global radix tree or system MM). After getting the
page, tcmu in kernel will use it my kmap(). Free it with kumapp() and 
insert to
global radix tree.


BRs
Xiubo

      parent reply	other threads:[~2017-03-01 10:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17  9:24 [PATCH] target/user: Add daynmic growing data area feature support lixiubo
2017-02-22 20:32 ` Andy Grover
2017-02-24  2:07   ` [PATCH] target/user: Add daynmic growing data area featuresupport Xiubo Li
2017-02-24 22:29     ` Andy Grover
2017-02-27  5:59       ` Xiubo Li
2017-02-27 19:32         ` how to unmap pages in an anonymous mmap? Andy Grover
2017-02-27 19:32           ` Andy Grover
2017-03-10  1:45           ` Xiubo Li
2017-03-10  1:45             ` Xiubo Li
2017-03-10  1:45             ` Xiubo Li
2017-02-27 23:56   ` [PATCH] target/user: Add daynmic growing data area feature support Mike Christie
2017-02-28  1:22     ` [PATCH] target/user: Add daynmic growing data area featuresupport Xiubo Li
2017-02-28 18:13       ` Mike Christie
2017-03-01  1:22         ` Xiubo Li
2017-02-28  9:13     ` Xiubo Li
2017-03-01 10:53   ` 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=770ba3ff-5075-8673-d53b-f6feda0fdc28@cmss.chinamobile.com \
    --to=lixiubo@cmss.chinamobile.com \
    --cc=agrover@redhat.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=hch@lst.de \
    --cc=hujianfei@cmss.chinamobile.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mchristi@redhat.com \
    --cc=nab@linux-iscsi.org \
    --cc=namei.unix@gmail.com \
    --cc=sheng@yasker.org \
    --cc=shli@kernel.org \
    --cc=target-devel@vger.kernel.org \
    /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.