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: <275d2c83-d85d-1b60-cd11-8b5760e67ce0@pensando.io>
Date:   Mon, 14 Sep 2020 14:50:19 -0700
From:   Shannon Nelson <snelson@...sando.io>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH net-next] ionic: dynamic interrupt moderation

On 9/14/20 2:10 PM, Jakub Kicinski wrote:
> On Sun, 13 Sep 2020 14:28:13 -0700 Shannon Nelson wrote:
>> Use the dim library to manage dynamic interrupt
>> moderation in ionic.
>>
>> Signed-off-by: Shannon Nelson <snelson@...sando.io>
> Let me advertise my people.kernel entry ;)
>
> https://people.kernel.org/finqi53erl
>
> My somewhat short production experience leads me to question the value
> of DIM on real life workloads, but I know customers like to benchmark
> adapters using ping and iperf, so do what you gotta do :(

Yes, I saw your article, and I figured this little patch might catch 
your attention :-).

This at least can do some general automated tweaking for those aren't 
going to do hand tuning for particular workloads.  For others, we still 
have the ability to split the Tx and Rx interrupts and tune them 
separately if desired.

>
>> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
>> index 895e2113bd6b..f1c8ab439080 100644
>> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
>> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
>> @@ -42,6 +42,19 @@ static int ionic_start_queues(struct ionic_lif *lif);
>>   static void ionic_stop_queues(struct ionic_lif *lif);
>>   static void ionic_lif_queue_identify(struct ionic_lif *lif);
>>   
>> +static void ionic_dim_work(struct work_struct *work)
>> +{
>> +	struct dim *dim = container_of(work, struct dim, work);
>> +	struct dim_cq_moder cur_moder =
>> +		net_dim_get_rx_moderation(dim->mode, dim->profile_ix);
> Could you move this out of the variable init? Make things hard to read.

Sure.

>
>> +	struct ionic_qcq *qcq = container_of(dim, struct ionic_qcq, dim);
>> +	u32 new_coal;
>> +
>> +	new_coal = ionic_coal_usec_to_hw(qcq->q.lif->ionic, cur_moder.usec);
>> +	qcq->intr.dim_coal_hw = new_coal ? new_coal : 1;
>> +	dim->state = DIM_START_MEASURE;
>> +}
> Interesting, it seem that you don't actually talk to FW to update
> the parameters? DIM causes noticeable increase in scheduler pressure
> with those work entries it posts. I'd be tempted to not use a work
> entry if you don't have to sleep.

net_dim() assumes a valid work_struct in struct dim, and would likely 
get annoyed if it wasn't set up.  I suppose we could teach net_dim() to 
look into the work_struct to verify that .func is non-NULL before 
calling schedule_work(), but that almost feels like cheating.

sln




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ