public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Dietmar Maurer <dietmar@proxmox.com>
Cc: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	 Stefan Sterz <s.sterz@proxmox.com>
Subject: Re: [pbs-devel] [RFC PATCH 0/5] fix #3935: refactor datastore locking to use tmpfs
Date: Tue, 22 Mar 2022 10:57:57 +0100	[thread overview]
Message-ID: <20220322095757.ufvywlmzw37e3yzn@olga.proxmox.com> (raw)
In-Reply-To: <652219984.1036.1647942380429@webmail.proxmox.com>

On Tue, Mar 22, 2022 at 10:46:20AM +0100, Dietmar Maurer wrote:
> > - A "hashmap lock file": An in-memory file filled with robust-futex
> >   where the group name simply gets hashed to get to a positioin in the
> >   file. Hash clashes aren't an issue since all they'd do is cause
> >   multiple groups to be guarded by the same lock, which wouldn't
> >   technically be wrong.
> 
> Just want to note that above approach could lead to unexpected deadlocks with hash clashes, so I guess it is not that simple to get it right...

Although this depends on the exact use case. For the most part you can
get away with checking whether the mutexes are the same, or probably
with just setting the mutex type to be recursive to allow the same
thread to lock it multiple times.




  reply	other threads:[~2022-03-22  9:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22  9:46 Dietmar Maurer
2022-03-22  9:57 ` Wolfgang Bumiller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-18 14:06 Stefan Sterz
2022-03-22  9:38 ` Wolfgang Bumiller

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

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

  git send-email \
    --in-reply-to=20220322095757.ufvywlmzw37e3yzn@olga.proxmox.com \
    --to=w.bumiller@proxmox.com \
    --cc=dietmar@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=s.sterz@proxmox.com \
    /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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal