Both the size (128 bytes) and ephemeral nature of allocations make it a great fit for malloc.
A dedicated zone unnecessarily avoids sharing buckets with 128-byte objects.
Differential D27103
nvme: change namei_request_zone into a malloc type mjg on Nov 5 2020, 12:38 PM. Authored by Tags None Referenced Files
Subscribers
Details Both the size (128 bytes) and ephemeral nature of allocations make it a great fit for malloc. A dedicated zone unnecessarily avoids sharing buckets with 128-byte objects.
Diff Detail
Event TimelineComment Actions My only concern would be how this affects our ability to make sure we can always make progress in a resource shortage... But it's likely a wash. Comment Actions If anything the patch should make things better especially in low memory conditions. Take a look at zone stats at your favorite box. If you vmstat -z | grep 128 you should find the zone with some number of items allocated and quite a decent number of items free. Given transient allocations from nvme, it is very likely that zone would handle all of them without pulling more pages than it does now. At the same time sysctl vm.uma.nvme_request | grep pages will show you total page count which is only used because you are not sharing buckets with the 128 byte malloc. Comment Actions OK. Sounds fine for now, and it would be a lot of heavy lifting to get something significantly better (eg, reserved spaces). Comment Actions Right, removing all spurious zones will make you less likely to run into low memory condition. But if you get there, I suspect it's going to be a huge hit or miss. Comment Actions Right. W/o having special 'low memory' handling / reserve to ensure progress is made, having this as a zone isn't beneficial. |