Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



Hello,

Mindaugas said:
> Can you explain what the actual problem M_WAIT causes i.e. how would
> it "freeze network stack"?

In M_WAIT case, m_reclaim() will run and run until get mbuf cluster
if mclpool limit reached.  If m_reclaim() repeatedly but cannot to
get new mbuf cluster, m_clget() will not return.

network stacks using mbufs is use with M_DONTWAIT, but it will failed
to get new mbuf cluster in this case.  "freeze" means that.

Generally NMBCLUSTERS is enough and SB_MAX is small, the problem
is rarely caused.  It depends parameter configuration, I think.

In other words, to cause this problem,
- many packets receives from the network, it will read by userland
- userland program sends many packets, but not read packet from the stack
- and mclpool limit reached.
- no one calls pool_put()

In M_DONTWAIT case, M_EXT flag is result of m_clget().
code of checking M_EXT is already prepared, but didn't used
it with M_WAIT.  I think this is careless miss.

Thanks.
--
Masaru OKI <oki%NetBSD.org@localhost>


Home | Main Index | Thread Index | Old Index