From: Andy Grover <agrover@redhat.com>
To: lixiubo@cmss.chinamobile.com, nab@linux-iscsi.org, mchristi@redhat.com
Cc: shli@kernel.org, sheng@yasker.org, linux-scsi@vger.kernel.org,
target-devel@vger.kernel.org, namei.unix@gmail.com,
linux-mm@kvack.org
Subject: Re: [PATCHv2 2/5] target/user: Add global data block pool support
Date: Wed, 8 Mar 2017 12:20:54 -0800 [thread overview]
Message-ID: <3b1ce412-6072-fda1-3002-220cf8fbf34f@redhat.com> (raw)
In-Reply-To: <1488962743-17028-3-git-send-email-lixiubo@cmss.chinamobile.com>
On 03/08/2017 12:45 AM, lixiubo@cmss.chinamobile.com wrote:
> From: Xiubo Li <lixiubo@cmss.chinamobile.com>
>
> For each target there will be one ring, when the target number
> grows larger and larger, it could eventually runs out of the
> system memories.
>
> In this patch for each target ring, the cmd area size will be
> limited to 8M and the data area size will be limited to 1G. And
> the data area will be divided into two parts: the fixed and
> growing.
>
> For the fixed part, it will be 1M size and pre-allocated together
> with the cmd area. This could speed up the low iops case, and
> also could make sure that each ring will have at least 1M private
> data size when there has too many targets, which could get their
> data blocks as quick as possible.
>
> For the growing part, it will get the blocks from the global data
> block pool. And this part will be used for high iops case.
>
> The global data block pool is a cache, and the total size will be
> limited to max 2G(grows from 0 to 2G as needed). And it will cache
> the freed data blocks by a list, All targets will get from/release
> to the free blocks here.
Hi Xiubo,
I will leave the detailed patch critique to others but this does seem to
achieve the goals of 1) larger TCMU data buffers to prevent bottlenecks
and 2) Allocating memory in a way that avoids using up all system memory
in corner cases.
The one thing I'm still unsure about is what we need to do to maintain
the data area's virtual mapping properly. Nobody on linux-mm answered my
email a few days ago on the right way to do this, alas. But, userspace
accessing the data area is going to cause tcmu_vma_fault() to be called,
and it seems to me like we must proactively do something -- some kind of
unmap call -- before we can reuse that memory for another, possibly
completely unrelated, backstore's data area. This could allow one
backstore handler to read or write another's data.
Regards -- Andy
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next parent reply other threads:[~2017-03-08 20:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1488962743-17028-1-git-send-email-lixiubo@cmss.chinamobile.com>
[not found] ` <1488962743-17028-3-git-send-email-lixiubo@cmss.chinamobile.com>
2017-03-08 20:20 ` Andy Grover [this message]
2017-03-16 9:39 ` [PATCHv2 2/5] target/user: Add global data block pool support Xiubo Li
2017-03-17 8:04 ` Xiubo Li
2017-03-17 17:11 ` Andy Grover
2017-03-17 22:06 ` 李秀波
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=3b1ce412-6072-fda1-3002-220cf8fbf34f@redhat.com \
--to=agrover@redhat.com \
--cc=linux-mm@kvack.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lixiubo@cmss.chinamobile.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).