RFR: 8239129: Use DAX in ZGC
per.liden at oracle.com
Wed Feb 19 08:07:43 UTC 2020
On 2/17/20 1:28 PM, Yasumasa Suenaga wrote:
>>>>> webrev: http://cr.openjdk.java.net/~ysuenaga/JDK-8239129/webrev.00/
>>>> Before this patch can go forward, you need to get to the bottom of
>>>> how to get that ioctl command to work. If it's not possible, you
>>>> need to explain why and propose alternatives that we can discuss.
>>> I guess it is caused by Linux kernel.
>>> In case of ext4, `ext4_iflags_to_xflags()` would set filesystem flags
>>> to `struct FS_IOC_FSGETXATTR`.
>>> However `FS_XFLAG_DAX` is not handled in it.
>> Did a bit of googleing and it seems the DAX flag is in a bit of flux
>> at the moment. I guess this will be fixed down the road, when DAX in
>> the kernel becomes a non-experimental feature.
>> How about we just do like this for now:
> I thought ZGC requires tmpfs or hugetlbfs due to performance reason.
> So I introduced new -XX option to make users aware of it.
The filesystem type check is there to help users avoid the mistake of
placing the heap on an unintended/slow filesystem. However, most users
will never use -XX:AllocateHeapAt, so I think that risk is fairly small
to begin with.
The bar for adding new options to ZGC is high, and I don't think it's
high enough in this case. Also, other GCs happily allow you to place the
heap on any filesystem and I don't mind having that flexibility in ZGC too.
> If not so, I agree with your change.
I updated the patch, added and adjusted some logging, and added a test.
I also updated the bug title/description.
More information about the hotspot-gc-dev