From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH for-next 0/2] IB/mlx5: Use tasklet to decrease completions processing time in interrupts
Date: Wed, 18 May 2016 10:48:25 -0400 [thread overview]
Message-ID: <a6c058cd-929c-9f35-16fc-101467013572@redhat.com> (raw)
In-Reply-To: <868e5bcf-18c5-30f4-fe3f-b361c0ce43ec-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2556 bytes --]
On 05/15/2016 03:31 AM, Matan Barak wrote:
> On 13/05/2016 23:16, Doug Ledford wrote:
>> On 04/18/2016 09:21 AM, Matan Barak (External) wrote:
>>> On 18/04/2016 16:04, Christoph Hellwig wrote:
>>>> On Sun, Apr 17, 2016 at 05:08:39PM +0300, Matan Barak wrote:
>>>>> Hi Doug,
>>>>>
>>>>> The mlx5 driver handles completion callbacks inside interrupts.
>>>>> These callbacks could be lengthy and thus cause hard lockups.
>>>>> In order to avoid these lockups, we introduce a tasklet mechanism.
>>>>> The mlx5_ib driver uses this mechanism in order to defer its
>>>>> completion callbacks processing to the tasklet.
>>>>>
>>>>> This follows the same mechanism we implemented for mlx4 that
>>>>> successfully decreased the processing time in interrupts.
>>>>
>>>> Just curious: how much of this time is spent inside the mlx5 driver,
>>>> and how much is spent in the callbacks from the consumers? We've now
>>>> more than half done with switch the kernel ULPs to the new CQ API
>>>> which will always offload the callbacks to softirq or workqueue
>>>> context,
>>>> so if we can avoid a previous offload the completions would be a lot
>>>> more efficient.
>>>>
>>>
>>> In short, you could hit a situation where processing the completions in
>>> the interrupt takes longer than the rate at which they arrive (lab cases
>>> that use one event queue, but still).
>>> I agree that going to softirqs/WQs (like the rest of the offloads) is a
>>> good solution too - maybe even better than this one as the mechanism
>>> already exists, but why would it be a lot more efficient?
>>>
>>
>> Given the amount of the kernel converted to the new CQ API, are you guys
>> still looking to have this included?
>>
>
> Using irqpoll might be better, although - If I got things right it
> really polls the CQ instead of just notifying the user-space it has some
> work to do (because it handles kernel usages probably). So, in order to
> use the current approach for user-space, we might needs to change it a
> bit (unless I missed something).
>
> Saying that, because we're risking here at having a hard lockup and the
> mlx4 driver already uses this proposed method successfully, I'll be very
> happy if we can merge this and look at migrating to the new CQ API later
> if it makes sense here.
I've taken these, but I want you to look into whether or not the CQ API
is the next appropriate things to use here.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
prev parent reply other threads:[~2016-05-18 14:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-17 14:08 [PATCH for-next 0/2] IB/mlx5: Use tasklet to decrease completions processing time in interrupts Matan Barak
[not found] ` <1460902121-5567-1-git-send-email-matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-04-17 14:08 ` [PATCH for-next 1/2] net/mlx5_core: Use tasklet for user-space CQ completion events Matan Barak
2016-04-17 14:08 ` [PATCH for-next 2/2] IB/mlx5: Fire the CQ completion handler from tasklet Matan Barak
2016-04-18 13:04 ` [PATCH for-next 0/2] IB/mlx5: Use tasklet to decrease completions processing time in interrupts Christoph Hellwig
[not found] ` <20160418130456.GA11508-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-04-18 13:21 ` Matan Barak (External)
[not found] ` <5714DF68.6040509-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-04-18 14:33 ` Sagi Grimberg
2016-05-13 20:16 ` Doug Ledford
[not found] ` <a93b20ca-42bf-ca2b-2995-aa2837a1bafe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-15 7:31 ` Matan Barak
[not found] ` <868e5bcf-18c5-30f4-fe3f-b361c0ce43ec-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-18 14:48 ` Doug Ledford [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=a6c058cd-929c-9f35-16fc-101467013572@redhat.com \
--to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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