svn commit: r356480 - head/sys/dev/nvme

Warner Losh imp at bsdimp.com
Tue Jan 7 23:30:45 UTC 2020


On Tue, Jan 7, 2020 at 4:10 PM Alexander Motin <mav at freebsd.org> wrote:

> Author: mav
> Date: Tue Jan  7 23:10:38 2020
> New Revision: 356480
> URL: https://svnweb.freebsd.org/changeset/base/356480
>
> Log:
>   Increate HMB limit from 1% to 5%.
>
>   SSD capacity in laptops is growing faster then RAM size, so my original
>   guess seems too low on second thought.  Hopefully nobody will build large
>   array of those crappy SSDs.
>

If they do, they will likely want to turn off host buffer support anyway,
since it uses PCIe bandwidth and large arrays tend to oversubscribe the
PCIe bus...

Warner


>   MFC after:    2 weeks
>   X-MFC-with:   356474
>
> Modified:
>   head/sys/dev/nvme/nvme_ctrlr.c
>
> Modified: head/sys/dev/nvme/nvme_ctrlr.c
>
> ==============================================================================
> --- head/sys/dev/nvme/nvme_ctrlr.c      Tue Jan  7 22:45:02 2020
> (r356479)
> +++ head/sys/dev/nvme/nvme_ctrlr.c      Tue Jan  7 23:10:38 2020
> (r356480)
> @@ -881,8 +881,8 @@ nvme_ctrlr_hmb_alloc(struct nvme_controller *ctrlr)
>         int err, i;
>         uint64_t max;
>
> -       /* Limit HMB to 1% of RAM size per device by default. */
> -       max = (uint64_t)physmem * PAGE_SIZE / 100;
> +       /* Limit HMB to 5% of RAM size per device by default. */
> +       max = (uint64_t)physmem * PAGE_SIZE / 20;
>         TUNABLE_UINT64_FETCH("hw.nvme.hmb_max", &max);
>
>         min = (long long unsigned)ctrlr->cdata.hmmin * 4096;
>


More information about the svn-src-all mailing list