Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2014 16:05:14 -0500
From:      Garrett Wollman <wollman@bimajority.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: Use of contiguous physical memory in cxgbe driver
Message-ID:  <21245.13194.145088.287817@hergotha.csail.mit.edu>
In-Reply-To: <6154054.5G06XIekg6@ralph.baldwin.cx>
References:  <21216.22944.314697.179039@hergotha.csail.mit.edu> <201402121446.19278.jhb@freebsd.org> <CAJ-VmokDb4dkhzO6NnYrFKKV2g-bau8H47h2g=wOkvGcqYzRow@mail.gmail.com> <6154054.5G06XIekg6@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Thu, 13 Feb 2014 15:16:54 -0500, John Baldwin <jhb@freebsd.org> said:

> It seeks to use the smallest size possible however.  It is true that
> we don't attempt to move a busy page elsewhere to free up memory
> (e.g. if you had a 2MB free chunk with one busy 4k page in the
> middle), but we can't really do that safely.  Given the existence of
> the direct map, we can't relocate a page and be sure that we have
> also relocated all possible pointers to it.

I doubt that this can be usefully auto-configured.  As an
administrator, I would be perfectly happy with a situation where I can
tell the system to set aside some amount of memory at initialization
(say, 16 superpages per (virtual) CPU) and get better performance.
It's not a real imposition on a 128-GB server to set aside 1 GB of
memory for big contiguous allocations if the applications will benefit
from it.  But in the absence of a guaranteed allocation, network
drivers need to avoid requiring contiguous physical memory when they
don't need it.

-GAWollman




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?21245.13194.145088.287817>