On Tue, Jun 26, 2012 at 5:57 AM, Jeremy C. Reed <[email protected]> wrote:
> On Tue, 26 Jun 2012, Claudio Jeker wrote:
>> On Mon, Jun 25, 2012 at 04:57:04PM -0500, Jeremy C. Reed wrote:
...
>> > I am looking at sbcheckreserve and sbchecklowmem in
>> > src/sys/kern/uipc_socket2.c.
>> >
>> > What does sbchecklowmem() return if between the two limits? (Can that
>> > condition occur?)

The sblowmem variable has *static* storage duration.  So, if between
the two limits then sbchecklowmem() returns the same thing as the
previous call to sbchecklowmem().  (For those wondering about the
first call, recall that static storage duration variables are
initialized to zero.)


> I had mentioned about same code above. Where is it documented? I also
> asked a question above can it be between the two limits and get a wrong
> response? (Can someone explain that?)

Sorry, in this case, the C code *is* the documentation.  If you're
reading the kernel code then you should check things in the rough
order:
1) is there a section 9 manpage for the function?
2) does the C standard specify the behavior?
3) what does gcc do?


> I am curious how the system may be running out of mbufs. (Normally
> nothing is running except the default, standard processes as known after
> a new bare install.) Is there something in the vmstat (or other tool)
> output to see why it doesn't reclaim memory?

Insufficient data.  I would suggest tracking the output of "vmstat -m"
over time and then looking at the values and think about what they say
about the memory usage of the system.


Philip Guenther

Reply via email to