unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers via Libc-alpha <libc-alpha@sourceware.org>
To: Eric Wong <normalperson@yhbt.net>, Carlos O'Donell <carlos@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [RFC/PoC] malloc: use wfcqueue to speed up remote frees
Date: Wed, 18 Jan 2023 09:53:24 -0500	[thread overview]
Message-ID: <084051cc-7ddb-eb66-3361-41a7eb79d959@efficios.com> (raw)
In-Reply-To: <20230117064251.M336757@dcvr>

On 2023-01-17 01:42, Eric Wong wrote:
> Carlos O'Donell <carlos@redhat.com> 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.

I've done a quick review of your proposed patch, and there is one thing 
that I'm concerned about: forward progress of remote_free_finish(). 
AFAIU, if we have a steady flow of remote_free_begin() calls, it can 
prevent forward progress of the anena owner.

When remote_free_step() captures the queue (splice) and processes it, it 
returns whether it has processed any elements, and the caller attempts 
to splice again if there was anything present. What I wonder is why is 
it required that the caller splices queue elements that were queued 
_after_ the begin of remote_free_finish() ? Can't we simply leave those 
to the next (eventual) remote_free_finish calls ?

If we do that change, this means remote_free_finish would only be needed 
when tearing down an arena, and upon allocation only a single call to 
remote_free_step() would be needed.

Thoughts ?

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com


  parent reply	other threads:[~2023-01-18 14:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-31  8:49 [RFC/PoC] malloc: use wfcqueue to speed up remote frees Eric Wong
2018-07-31 12:16 ` Carlos O'Donell
2018-07-31 23:18   ` Eric Wong
2018-08-01  4:41     ` Carlos O'Donell
2018-08-01  6:23       ` Eric Wong
2018-08-01  7:01         ` Carlos O'Donell
2018-08-01  9:26           ` Eric Wong
2018-08-02 21:38             ` Carlos O'Donell
2023-01-17  6:42       ` Eric Wong via Libc-alpha
2023-01-17 19:05         ` Mathieu Desnoyers via Libc-alpha
2023-01-18 15:48           ` Mathieu Desnoyers via Libc-alpha
2023-01-18 19:12             ` Eric Wong via Libc-alpha
2023-01-18 19:17               ` Mathieu Desnoyers via Libc-alpha
2023-01-18 20:05                 ` Eric Wong via Libc-alpha
2023-01-18 14:53         ` Mathieu Desnoyers via Libc-alpha [this message]
2023-01-18 14:58           ` Mathieu Desnoyers via Libc-alpha
2018-08-08 10:40   ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=084051cc-7ddb-eb66-3361-41a7eb79d959@efficios.com \
    --to=libc-alpha@sourceware.org \
    --cc=carlos@redhat.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).