Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2021 19:41:53 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        John Baldwin <jhb@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: d1cbe7908986 - main - Allocating the LinuxKPI current structure from an interrupt thread must be done using the M_NOWAIT flag after 1ae20f7c70ea .
Message-ID:  <3dcd63b0-fe90-2855-f349-2117ca4b6b26@selasky.org>
In-Reply-To: <YEpi65EJZrFHf5Dj@kib.kiev.ua>
References:  <202103100952.12A9qRKR040117@gitrepo.freebsd.org> <YEiZwWT28AeXzQjA@kib.kiev.ua> <2b1739ab-000c-ca28-5a59-0a3e19ef4591@selasky.org> <5aaa5f2a-a67d-a495-7f56-a6b31c2494c7@FreeBSD.org> <ba608afb-d8bb-242a-9170-e30b2291411e@selasky.org> <YEpi65EJZrFHf5Dj@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/11/21 7:35 PM, Konstantin Belousov wrote:
> And I dislike this.  It is yet another case of introducing consumer-specific
> logic into core.  Isn't netepoch example enough?
> 
> I presented another patch to Hans, where task and mm allocations are
> switched to zones, and the zones have reserve applied. Then allocations
> from ithreads use the reserve.
> 
> There is one detail there, reserve is finite, for x86 I set it to the
> total limit of interrupts. This somewhat breaks if interrupts are
> deallocated and reallocated, but I think it is good enough even with
> this wart.

Hi,

Your patch doesn't address the issue of initializing the pointers in 
question once. Still, for every call, we need to check if the pointer is 
valid. This is not neccessary.

Also I don't see why we need to create a own UMA zone for these simple 
structures. Won't the per-CPU sysctl consume more memory than the actual 
task structures being allocated?

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3dcd63b0-fe90-2855-f349-2117ca4b6b26>