Date: Tue, 7 Jun 2022 11:14:28 +0200 From: "Floyd, Paul" <paulf2718@gmail.com> To: freebsd-threads@freebsd.org Subject: Re: LDT/GDT and TCB use by threads Message-ID: <546afbb1-5282-8723-ed04-db6f7f85aa58@gmail.com> In-Reply-To: <YoABKg5l5zd%2BJpi3@kib.kiev.ua> References: <75f350fa-4fb5-f1e7-2a45-bb825a6620d3@gmail.com> <YoABKg5l5zd%2BJpi3@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi I have now fixed this issue, mainly by tracing the working Valgrind x86 Linux version. Previously, on FreeBSD the first thread created would allocate a GDT and this would be reused by all other threads until the creation of the 8192nd thread when there would no longer be a free slot and it would fail. Now each thread gets its own GDT which is initialized as a copy of the parent thread's GDT. This GDT gets freed after thr_exit. No more slot exhaustion due to large numbers of short-lived threads being created. A+ Paul
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?546afbb1-5282-8723-ed04-db6f7f85aa58>