From owner-freebsd-hackers@freebsd.org Thu May 11 08:28:57 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06A29D6785F for ; Thu, 11 May 2017 08:28:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92ADB1B16 for ; Thu, 11 May 2017 08:28:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v4B8Shmp084145 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 11 May 2017 11:28:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v4B8Shmp084145 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v4B8Sh6o084144; Thu, 11 May 2017 11:28:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 11 May 2017 11:28:43 +0300 From: Konstantin Belousov To: Sebastian Huber Cc: FreeBSD Subject: Re: Linux gen_pool allocator replacement? Message-ID: <20170511082843.GU1622@kib.kiev.ua> References: <5912D448.5060201@embedded-brains.de> <20170510091946.GT1622@kib.kiev.ua> <591405E1.1000204@embedded-brains.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <591405E1.1000204@embedded-brains.de> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 08:28:57 -0000 On Thu, May 11, 2017 at 08:34:09AM +0200, Sebastian Huber wrote: > Thanks for the hint to vmem(9). There seems to be already a > driver-specific support using blist for gen_pool: > > https://github.com/freebsd/freebsd/blob/master/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.h#L190 I see. Just a note, this is rather naive and lock-heavy comparing with the caching and streamlined vmem(9). OTOH, the code seems to be from the time when we did not have vmem(9) ported.