Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Oct 2011 09:27:24 -0700
From:      Chuck Tuffli <ctuffli@gmail.com>
To:        mj@feral.com
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: determining bus_dma memory usage by driver
Message-ID:  <CAKAYmMK1vhN8RJ-L0iZ-GYjKqk9tg0MDoknBs1sNmXkhV1gW5w@mail.gmail.com>
In-Reply-To: <4EA62F32.6010305@feral.com>
References:  <CAKAYmMLK7ryu6dVyy_gh6VxkzCMCEXq-8zL=fWbExBV3oijc-g@mail.gmail.com> <4EA62F32.6010305@feral.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 24, 2011 at 8:38 PM, Matthew Jacob <mj@feral.com> wrote:
>
> On 10/24/2011 5:21 PM, Chuck Tuffli wrote:
>>
>> Is there an easy way to determine the amount of bus_dma memory
>> allocated by a driver? Something similar to vmstat -m
>>
>
> bus_dma memory allocations are platform specific. Looking at least amd64 you can see that the memory is carved out M_DEVBUF.

OK, so do a diff of

vmstat -m | grep devbuf

before and after driver load would get me the right number? Does this
double count any memory reported by the MALLOC_DEFINE()?

---chuck



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