Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Commit 9d96fb8

Browse files
committed
Add rackscale vmops lat benchmark
1 parent 7fdf34e commit 9d96fb8

File tree

6 files changed

+497
-375
lines changed

6 files changed

+497
-375
lines changed

doc/src/environment/Environment.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ the ivshmem server code. Open ```contrib/ivshmem-server/ivshmem-server.c```.
2828
Go to the function```ivshmem_server_ftruncate```. Replace it with:
2929
```c
3030
static int
31-
ivshmem_server_ftruncate(int fd, unsigned shmsize)
31+
ivshmem_server_ftruncate(int fd, uint64_t shmsize)
3232
{
33+
int ret;
3334
struct stat mapstat;
3435

3536
/* align shmsize to next power of 2 */
@@ -39,7 +40,19 @@ ivshmem_server_ftruncate(int fd, unsigned shmsize)
3940
return 0;
4041
}
4142

42-
return ftruncate(fd, shmsize);
43+
/*
44+
* This is a do-while loop in case
45+
* shmsize > IVSHMEM_SERVER_MAX_HUGEPAGE_SIZE
46+
*/
47+
do {
48+
ret = ftruncate64(fd, shmsize);
49+
if (ret == 0) {
50+
return ret;
51+
}
52+
shmsize *= 2;
53+
} while (shmsize <= IVSHMEM_SERVER_MAX_HUGEPAGE_SIZE);
54+
55+
return -1;
4356
}
4457
```
4558
@@ -56,3 +69,8 @@ qemu-system-x86_64 --version
5669
You can also add `--enable-debug` to the configure script which will add debug
5770
information (useful for source information when stepping through qemu code in
5871
gdb).
72+
73+
Note that if you are only updating the ```ivshmem-server```, it may not install
74+
correctly with the ```make install``` command above. Instead, you can use
75+
```which ivshmem-server``` to find the current location and then overwrite it
76+
with ```qemu-6.0.0/build/contrib/ivshmem-server/ivshmem-server```.

0 commit comments

Comments
 (0)