tech-kern archive

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

Re: RFC: m_tag pool cache



On Fri, Feb 19, 2016 at 08:29:35PM +0900, Kengo NAKAHARA wrote:
> Hi,
> 
> On 2016/02/19 19:38, Joerg Sonnenberger wrote:
> > On Fri, Feb 19, 2016 at 06:26:14PM +0900, Kengo NAKAHARA wrote:
> >> Of course, m_tag_get() is used by packet processing path, this overhead
> >> would have a certain influence on packet throughput and latency.
> >> So, I think m_tag should use a dedicated pool cache like mbuf to call
> >> pool_cache_get() directly.
> > 
> > Which tags are you actually seeing allocated? It would be better to
> > remove the tags in first place if they are hot enough...
> 
> I am seeing a struct altq_pktattr tag, which is used to refactor ALTQ
> in my working modification. I think ALTQ code would become better than
> now by using altq_pktattr tag...
> # The altq_pktattr tag is also used by sys/dist/pf/net/pf.c, so I think
> # the result affect NetBSD-current itself.
> 
> I agree it should be removed in first place. However, I think there is
> several cases which cannot avoid to use m_tag. So, it may be required
> to rescue such cases.

We don't have that many random consumers of tags in the tree. For the
hot cases, it makes a lot more sense to put a field or two into the mbuf
packet header -- if more data is needed, a specific pool is needed
anyway.

Joerg


Home | Main Index | Thread Index | Old Index