perfbook.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Huang <mmpgouride@gmail.com>
To: perfbook@vger.kernel.org
Subject: Question: What does "one thread can enter but two threads can exit" mean?
Date: Tue, 11 Apr 2023 00:40:19 +0800	[thread overview]
Message-ID: <FE0E33DE-C0A0-4065-99CC-5F0AB58E7A67@gmail.com> (raw)

Hi,

I am reading section 6.5.4, there is one paragraph said:

> The fraction of cells visited by PWQ is similar to that of SEQ. In addition, PWQ’s solution time is greater than that of PART, even for equal visit fractions. The reason for this is shown in Figure 6.28, which has a red circle on
> Figure 6.29: Effect of Compiler Optimization (-O3)
> each cell with more than two neighbors. Each such cell can result in contention in PWQ, because one thread can enter but two threads can exit, which hurts performance,

I don't know why there is competition only when a cell has more than two neighbors?

And as the subject said, what does "one thread can enter but two threads can exit” mean?

After checking the code(maze_fg.c), Doesn’t every cell in the maze can result in contention?

Thanks,
Alan



             reply	other threads:[~2023-04-10 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10 16:40 Alan Huang [this message]
2023-04-10 18:14 ` Question: What does "one thread can enter but two threads can exit" mean? Paul E. McKenney

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=FE0E33DE-C0A0-4065-99CC-5F0AB58E7A67@gmail.com \
    --to=mmpgouride@gmail.com \
    --cc=perfbook@vger.kernel.org \
    /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).