All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Huang <mmpgouride@gmail.com>
To: Akira Yokosawa <akiyks@gmail.com>, paulmck@kernel.org
Cc: perfbook@vger.kernel.org
Subject: Re: [PATCH] SMPDesign: Remove duplicate item
Date: Wed, 12 Apr 2023 18:40:53 +0800	[thread overview]
Message-ID: <3F00B031-34BC-4636-9DE9-888797028524@gmail.com> (raw)
In-Reply-To: <65116a6a-50c1-583b-0790-31b405c2c4dd@gmail.com>

> One extreme approach for the greatest efficiency might be not to
> parallelize at all, to use a single CPU, and to get a negative
> speedup (i.e., speed down).

But we can also get the greatest efficiency using data ownership under the maximum degree of parallelism.

> Anyway, this list is more of a guideline of approaches to
> parallel-programming design considerations.

Got it.


Thanks,
Alan



> 2023年4月12日 上午10:51,Akira Yokosawa <akiyks@gmail.com> 写道:
> 
> On Wed, 12 Apr 2023 09:15:12 +0800, Alan Huang wrote:
>>>> -	Similarly, the greater the desired efficiency, the smaller
>>>> +	Similarly, the greater the desired efficiency, the bigger
>>>> 	the achievable speedup.
>>> 
>>> I might not be fully woken up, but this change doesn't make
>>> sense to me.
>> 
>> The original sentence means (to me) If we get greater efficiency use of CPUs,
>> we get smaller speedup.
>> 
>> If I misunderstood, please correct me.
> 
> My version of interpretation of the sentence:
> 
>   Similarly, if our goal is greater efficiency, we might end up
>   in a smaller speedup in the end.
> 
> One extreme approach for the greatest efficiency might be not to
> parallelize at all, to use a single CPU, and to get a negative
> speedup (i.e., speed down).
> 
>> 
>>>   If the critical sections have high overhead compared to
>>>   the primitives guarding them, the best way to improve
>>>                                                 ^^^^^^^
>>>   speedup is to increase parallelism by moving to reader/writer
>>>   ^^^^^^^
>>>   locking, data locking, asymmetric, or data ownership.
>>>            ^^^^^^^^^^^^^                ^^^^^^^^^^^^^^
>>> 
>>> Item 5:
>>> 
>>>   If the critical sections have high overhead compared to
>>>   the primitives guarding them and the data structure being
>>>                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>   guarded is read much more often than modified, the best way
>>>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>   to increase parallelism is to move to reader/writer locking
>>>   or asymmetric primitives.
>>> 
>>> Are you sure they are duplicates ???
>> 
>> 
>> If the critical sections have high overhead compared to the primitives guarding them,
>> It means that the overhead of primitives is relative small, but the aim of data locking and data ownership 
>> is to reduce the overhead of primitives.
> 
> Well, I think Paul's motivation of special casing read-mostly
> data comes from his expertise in RCU.
> 
> I'd like to respect his motivation.
> 
> Anyway, this list is more of a guideline of approaches to
> parallel-programming design considerations.
> Why do you want it to be so precise ???
> 
>        Thanks, Akira
> 
>> 
>> Thanks,
>> Alan
>> 
> [...]


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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 16:28 [PATCH] SMPDesign: Remove duplicate item Alan Huang
2023-04-12  0:16 ` Akira Yokosawa
2023-04-12  1:15   ` Alan Huang
2023-04-12  2:51     ` Akira Yokosawa
2023-04-12 10:40       ` Alan Huang [this message]

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=3F00B031-34BC-4636-9DE9-888797028524@gmail.com \
    --to=mmpgouride@gmail.com \
    --cc=akiyks@gmail.com \
    --cc=paulmck@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.