wired memory - again!

Konstantin Belousov kostikbel at gmail.com
Tue Jun 12 20:45:26 UTC 2012


On Tue, Jun 12, 2012 at 08:51:34AM -0600, Ian Lepore wrote:
> On Sat, 2012-06-09 at 22:45 +0200, Wojciech Puchar wrote:
> > >
> > > First, all memory allocated by UMA and consequently malloc(9) is
> > > wired. In other words, almost all memory used by kernel is accounted
> > > as wired.
> > >
> > yes i understand this. still i found no way how to find out what allocated 
> > that much.
> > 
> > 
> > > Second, the buffer cache wires the pages which are inserted into VMIO
> > > buffers. So your observation is basically right, cached buffers means
> > 
> > what are exactly "VMIO" buffers. i understand that page must be wired WHEN 
> > doing I/O.
> > But i have too much wired memory even when doing no I/O at all.
> 
> I agree, this is The Big Question for me.  Why does the system keep
> wired writable mappings of the buffers in kva after the IO operations
> are completed?  
Read about buffer cache, e.g. in the Design and Implementation of
the FreeBSD OS book.

> 
> If it did not do so, it would fix the instruction-cache-disabled bug
> that kills performance on VIVT cache architectures (arm and mips) and it
> would reduce the amount of wired memory (that apparently doesn't need to
> be wired, unless I've missed the implications of a previous reply in
> this thread).

I have no idea what is the bug you are talking about. If my guess is
right, and it specifically references unability of some processors
to correctly handle several mappings of the same physical page into
different virtual addresses due to cache tagging using virtual address
instead of physical, then this is a hardware bug, not software.

AFAIR, at least HP PA and MIPS have different instantiation of this problem.
Our kernel uses multi-mapping quite often, and buffers is only one example.

Also, why do you think that the pages entered into buffers shall not be
wired, it is completely beyond my understanding.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20120612/3d92d0ff/attachment.pgp


More information about the freebsd-hackers mailing list