Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

Troubleshooting • Re: Host memory buffer fails for nvme

$
0
0
In your case, to me it seems that either your kernel has changed between Jan 16 and Jan 17, or you have made some configuration change that somehow makes the kernel fail when it is reserving memory for HMB.

The "failed to allocate host memory buffer" message is inside this file (in the latest kernel):

https://github.com/raspberrypi/linux/b ... i.c#L2191

Can you take a look at your kernel source code here?

https://github.com/raspberrypi/linux/b ... i.c#L2140

As you can see, the nvme_alloc_host_mem() function had all its code except its error return value inside a #if 0/#endif, and also the __nvme_alloc_host_mem() was removed again with a #if 0/#endif. It was clear that it had been disabled to stop NVME drives to use HMB.

If that's your case, then you'll have to reactivate the disabled code and recompile the kernel. If not, you'll have to debug more to see why nvme_alloc_host_mem() is failing.

HMB is a nice feature to have in DRAM-less NVME SSDs. Instead of having an expensive DRAM inside the NVME, the disk borrows some RAM from the host, making it faster and more durable, so in my opinion it is worth enabling if the disk supports it. But of course, all disks that support HMB also work well if it is disabled.

I don't know why the folks from Raspberry Pi have disabled HMB that way (disabling pieces of code). It would have been much better not to touch kernel source and instead use a kernel command line parameter to disable HMB on boot: nvme.max_host_mem_size_mb=0. That way, it would be far easier for the final user to find that the HMB was disabled on purpose.

Statistics: Posted by eduvirna — Sat Apr 12, 2025 4:28 pm



Viewing all articles
Browse latest Browse all 8082

Trending Articles