lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <253sf78g79w.fsf@nvidia.com>
Date: Wed, 20 Sep 2023 19:04:59 +0300
From: Aurelien Aptel <aaptel@...dia.com>
To: Sagi Grimberg <sagi@...mberg.me>, linux-nvme@...ts.infradead.org,
 netdev@...r.kernel.org, hch@....de, kbusch@...nel.org, axboe@...com,
 chaitanyak@...dia.com, davem@...emloft.net, kuba@...nel.org
Cc: Boris Pismenny <borisp@...dia.com>, aurelien.aptel@...il.com,
 smalin@...dia.com, malin1024@...il.com, ogerlitz@...dia.com,
 yorayz@...dia.com, galshalom@...dia.com, mgurtovoy@...dia.com
Subject: Re: [PATCH v15 06/20] nvme-tcp: Add DDP data-path

Sagi Grimberg <sagi@...mberg.me> writes:
>> Sorry, the original answer was misleading.
>> The problem is not about the timing but only about which CPU the code is
>> running on.  If we move setup_ddp() earlier as you suggested, it can
>> result it running on the wrong CPU.
>
> Please define wrong CPU.

Let's say we connect with 1 IO queue on CPU 0.

We run our application which run IOs on multiple CPU cores (0 and 7 as
an example).
Whenever the IO was issued on CPU 7, setup_cmd_pdu() and queue_request()
will be run in the context of CPU 7.
We consider CPU 7 "wrong", because it isn't q->io_cpu (CPU 0).

It's only after queue_request() dispatches it that it will it run on CPU 0.

> But the sk_incmoing_cpu is updated with the cpu that is reading the
> socket, so in fact it should converge to the io_cpu - shouldn't it?

Yes, that is true.

> Can you please provide a concrete explanation to the performance
> degradation?

We believe the setup_ddp should be called from the CPU core on which the
nvme queue was created so all the IO path SW-HW interaction will run on
the same CPU core.
The performance degradation is relevant only to specific cases in which
the application will run on the "wrong" CPU core on which the NVMe queue
was not created.

If you don’t see it as a problem, we can move the setup_ddp to
setup_cmd_pdu().

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ