From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by sourceware.org (Postfix) with ESMTPS id 33CB33858D28 for ; Tue, 17 Jan 2023 19:05:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 33CB33858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=efficios.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1673982301; bh=OlNQba+rXCzpkZj11DyTL4MGTeYkQeN28iyvuN7wJSQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=k7K1WGSutHF4m5XvPGw2GnQn/490gjwaITBEIX9w6E6EmZ/CN3geQwwOOhLwVWths wsWfGGDhezOiy889St8JfK0I4QEnIqPFexrmGy7KT+0nFbJFXmSJ9BsDnCUbyX0eFn Znu4E5MUsQwDtODNX55agW1P+cayMF4JVgKOJNASyDOqfS3ZrJUF9tC1rY4woKu4yJ fKB8DVX1N/dApDUF6V2fP757CaAn0zkX2FmlDna21cNCUfiF6F3omudADRKac8U5B2 MLCEEHSA9Y0jKOCsScRrASTIVnNPIdRm7XJNvFop6Zu+b1O99B/1N5glR8YRRtkZcO QkfBL3+XHuvVA== Received: from [172.16.0.101] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4NxJHK27bWzh8s; Tue, 17 Jan 2023 14:05:01 -0500 (EST) Message-ID: Date: Tue, 17 Jan 2023 14:05:34 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [RFC/PoC] malloc: use wfcqueue to speed up remote frees Content-Language: en-US To: Eric Wong , Carlos O'Donell Cc: libc-alpha@sourceware.org References: <20180731084936.g4yw6wnvt677miti@dcvr> <0cfdccea-d173-486c-85f4-27e285a30a1a@redhat.com> <20180731231819.57xsqvdfdyfxrzy5@whir> <20230117064251.M336757@dcvr> From: Mathieu Desnoyers In-Reply-To: <20230117064251.M336757@dcvr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-01-17 01:42, Eric Wong wrote: > Carlos O'Donell wrote: >>>> - Adding urcu as a build-time dependency is not acceptable for >>>> bootstrap, instead we would bundle a copy of urcu and keep it >>>> in sync with upstream. Would that make your work easier? >> >> Eric Wong wrote: >>> Yes, bundling that sounds great. I assume it's something for >>> you or one of the regular contributors to work on (build systems >>> scare me :x) >> >> Yes, that is something we'd have to do. > > Hi, bringing this topic from 2018 up again (+Cc Mathieu): > https://inbox.sourceware.org/libc-alpha/c061de55-cc2a-88fe-564b-2ea9c4a7e632@redhat.com/T/ > > I'm wondering if URCU-in-glibc is still on the table. I'm also > considering an learning C11 atomics and deriving a standalone > wfcqueue w/o URCU atomics. Hi Eric, I'm very much interested to contribute portions of liburcu to glibc. I think what we would need at this point is to document where we see that liburcu infrastructure can improve glibc, and create a gradual integration roadmap based on priorities. We should identify the stake-holders interested in seeing this done, and then we can discuss the time-frame and resources available for this project. That being said, I suspect we'd want to cover a few pieces of technology in this list, namely: - Restartable Sequences (rseq system call), - membarrier system call, - liburcu and libside [1,2] RCU implementations, - liburcu data structures (e.g. wfcqueue). I would be tempted to go for an approach closer to the RCU implementation I have done in the libside project for glibc, because it supports having multiple RCU grace period domains per process, which allows to nicely split the locking dependencies into sub-domains, and therefore lessen the chances of deadlocks due to nesting of a global-domain RCU read-side/synchronize_rcu, and locking (e.g. mutexes). Thanks, Mathieu [1] https://github.com/efficios/libside/blob/master/src/rcu.c [2] https://github.com/efficios/libside/blob/master/src/rcu.h -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com