Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Nov 2012 18:02:36 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        alc@freebsd.org
Cc:        Konstantin Belousov <kostikbel@gmail.com>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, "Sears, Steven" <Steven.Sears@netapp.com>
Subject:   Re: Memory reserves or lack thereof
Message-ID:  <CAJ-Vmo=tk_yiukE_uZzDAgh6Q1RP=5Jz1G0heq%2BcANJ1di8Wzg@mail.gmail.com>
In-Reply-To: <CAJUyCcOKHH3TO6qaK9V7UY2HW%2Bp6T74DUUdmbSi4eeGyofrTdQ@mail.gmail.com>
References:  <A6DE036C6A90C949A25CE89E844237FB2086970A@SACEXCMBX01-PRD.hq.netapp.com> <20121110132019.GP73505@kib.kiev.ua> <CAJUyCcOKHH3TO6qaK9V7UY2HW%2Bp6T74DUUdmbSi4eeGyofrTdQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11 November 2012 13:40, Alan Cox <alan.l.cox@gmail.com> wrote:

>
> Agreed.  Once upon time, before SMPng, M_NOWAIT was rarely used.  It was
> well understand that it should only be used by interrupt handlers.
>
> The trouble is that M_NOWAIT conflates two orthogonal things.  The obvious
> being that the allocation shouldn't sleep.  The other being how far we're
> willing to deplete the cache/free page queues.
>
> When fine-grained locking got sprinkled throughout the kernel, we all to
> often found ourselves wanting to do allocations without the possibility of
> blocking.  So, M_NOWAIT became commonplace, where it wasn't before.

Well, what's the current set of best practices for allocating mbufs?

I don't mind going through ath(4) and net80211(4), looking to make it
behave better with mbuf allocations. There's 49 M_NOWAIT's in net80211
and 10 in ath(4). I wonder how many of them are synonyms with "don't
fail allocating", too. Hm.


Adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=tk_yiukE_uZzDAgh6Q1RP=5Jz1G0heq%2BcANJ1di8Wzg>