summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-09-11 02:02:15 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-09-11 02:02:15 +0000
commit8b8cf4ece660f8068313c4891bd675c5ef895cf4 (patch)
tree90402555c936b63614029ab800c86f3adc9f0ec2 /tests
parent0b39e3448aeace003ccdbcc54a32662e673c3131 (diff)
downloadsrc-test-8b8cf4ece660f8068313c4891bd675c5ef895cf4.tar.gz
src-test-8b8cf4ece660f8068313c4891bd675c5ef895cf4.zip
memfd_create: simplify HUGETLB support a little bit
This also fixes a minor issue that was missed in the initial review; the layout of the MFD_HUGE_* flags is actually not 1:1 bit:flag -- it instead borrowed the Linux convention of how this is laid out since it was originally implemented on Linux, the top 6 bits represent the shift required for the requested page size. This allows us to remove the flag <-> pgsize mapping table and simplify the logic just prior to validation of the requested page size. While we're here, fix two small nits: - HUGETLB memfd shouldn't exhibit the SHM_GROW_ON_WRITE behavior. We can only grow largepage shm by appropriately aligned (i.e. requested pagesize) sizes, so it can't work in the typical/sane fashion. Furthermore, Linux does the same, so let's be compatible. - We don't allow MFD_HUGETLB without specifying a pagesize, so no need to check for that later. Reviewed by: kib (slightly earlier version)
Notes
Notes: svn path=/head/; revision=365624
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions