-
Couldn't load subscription status.
- Fork 12
Update 9p mount syscall so mmap is rw #93
Conversation
|
depends on clearcontainers/linux#3 |
|
Does this need clearcontainers/linux#3 What will happen if we have an older kernel. |
|
As I look at this closer, I noticed a couple things:
I actually saw the failure go away in either case (seemingly the mmap resolves as rw), regardless of the guest kernel's config update. I'm asking Arindam for clarity on this next. I'm hoping to take a look @ the performance numbers for this PR -- @grahamwhaley - can you help point me in the right direction (or help with a run if you aren't tracking this repo w/ localci?) |
|
@egernst Thus, I'm not convinced the kernel config update is necessary (but I have not dug into it). I'll let @rarindam comment on that. For performance, sure, we can run the fs metrics. I will note here also, this msize setting improvement in the same area never did land in the |
|
From my measurements, mmap is slightly more performant relative to fscache and meets our RW needs. Will update the PR to use this cache mode instead. |
By default the mmap command for 9p is read only Reason: generic_file_readonly_mmap is used by 9pfs Kernel side client code in case there is no caching. Based on this, we should enable caching for our 9p mounts. There are two verified options for this: 1. cache=fscache 2. cache=mmap After running FIO tests (random and linear read/write i/o), I see mmap providing slightly better performance, and it does not require any additional kernel config options to be enabled. Currently the value of cache=none (the default for mount). Enabling caching gives performance that is on parity with no caching, and slight improvements for random write IO. Fixes #92. Signed-off-by: Eric Ernst <[email protected]>
|
Hi Eric, Graham,
Okay first things first:
From the 9pfs mount options, 2000L and acl are not required. These were part of my commandline, and I just pasted them, which I see have created a lot of confusion. So you can remove them, they are not relevant. Only thing required to be passed for 9p is cache=mmap OR fscache.
Second: It was from reading the code as Graham pointed out, that I discovered that by default, only READ only mmap is enabled in 9p. Hence when testpmd tries to acces a RW mmap area for rte config, it fails. Note: mmap call with RW will not fail. But trying to acces it through write, will fail.
The RW mmap is enabled (as part of different function table altogether) when one uses the mmap option while mounting.
Third: Its always good to have cache enabled to mmap or fscache, because no one knows which code will be using mmap in RW mode, which is actually a pretty common occurence.
Finally, if this issue is not being seen in 3.0 then there has been some change which I am not aware of, certainly for the better.
Arindam
On Aug 29, 2017, at 7:24 AM, Eric Ernst <[email protected]<mailto:[email protected]>> wrote:
From my measurements, mmap is slightly more performant relative to fscache and meets our RW needs. Will update the PR to use this cache mode instead.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#93 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AbyHQ1VtPvL06Oe8k9Fu4NB-6jPAtbh_ks5sdB8DgaJpZM4PE_7Q>.
|
|
Thanks @rarindam The issue is observed in 3.0 -- this pull request is being made to address and fix it. with cache=mmap, my issue is resolved. |
By default the mmap command for 9p is read only
Reason: generic_file_readonly_mmap is used by 9pfs Kernel side client
code, in case there is no caching.
For the guest OS, we need to ensure:
For 2, we want cache=fscache to enable writable mmaps. This patch
addresses this requirement.
Fixes #92.
Signed-off-by: Eric Ernst [email protected]