linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Haren Myneni <haren@linux.ibm.com>
To: Nathan Lynch <nathanl@linux.ibm.com>, linuxppc-dev@lists.ozlabs.org
Cc: aneesh.kumar@kernel.org, npiggin@gmail.com
Subject: Re: [PATCH v5] powerpc/pseries/vas: Use usleep_range() to support HCALL delay
Date: Mon, 15 Jan 2024 18:36:29 -0800	[thread overview]
Message-ID: <88b3cf3e-c207-cb46-f372-ff99fd172457@linux.ibm.com> (raw)
In-Reply-To: <87v87zaihc.fsf@li-e15d104c-2135-11b2-a85c-d7ef17e56be6.ibm.com>



On 1/11/24 9:27 AM, Nathan Lynch wrote:
> Haren Myneni <haren@linux.ibm.com> writes:
>> VAS allocate, modify and deallocate HCALLs returns
>> H_LONG_BUSY_ORDER_1_MSEC or H_LONG_BUSY_ORDER_10_MSEC for busy
>> delay and expects OS to reissue HCALL after that delay. But using
>> msleep() will often sleep at least 20 msecs even though the
>> hypervisor suggests OS reissue these HCALLs after 1 or 10msecs.
>>
>> The open and close VAS window functions hold mutex and then issue
>> these HCALLs. So these operations can take longer than the
>> necessary when multiple threads issue open or close window APIs
>> simultaneously, especially might affect the performance in the
>> case of repeat open/close APIs for each compression request.
>> On the large machine configuration which allows more simultaneous
>> open/close windows (Ex: 240 cores provides 4800 VAS credits), the
>> user can observe hung task traces in dmesg due to mutex contention
>> around open/close HCAlls.
> 
> Is this because the workload queues enough tasks on the mutex to trigger
> the hung task watchdog? With a threshold of 120 seconds, something on
> the order of ~6000 tasks each taking 20ms or more to traverse this
> critical section would cause the problem I think you're describing.
> 
> Presumably this change improves the situation, but the commit message
> isn't explicit. Have you measured the "throughput" of window open/close
> activity before and after? Anything that quantifies the improvement
> would be welcome.

Yes, tested on the large system which allows open/close 4800 windows at 
the same time (means 4800 tasks). Noticed sleep more than 20msecs for 
some tasks and getting hung traces for some tasks since the combined 
waiting timing is more then 120seconds. With this patch, the maximum 
sleep is 10msecs and did not see these traces on this system. I will add 
more description to the commit log.

Thanks
Haren




      reply	other threads:[~2024-01-16  2:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11  6:25 [PATCH v5] powerpc/pseries/vas: Use usleep_range() to support HCALL delay Haren Myneni
2024-01-11 17:27 ` Nathan Lynch
2024-01-16  2:36   ` Haren Myneni [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=88b3cf3e-c207-cb46-f372-ff99fd172457@linux.ibm.com \
    --to=haren@linux.ibm.com \
    --cc=aneesh.kumar@kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nathanl@linux.ibm.com \
    --cc=npiggin@gmail.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;
as well as URLs for NNTP newsgroup(s).