Skip to content

Commit

Permalink
ionic: check for queue deadline in doorbell_napi_work
Browse files Browse the repository at this point in the history
Check the deadline against the last time run and only
schedule a new napi if we haven't been run recently.

Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Link: https://lore.kernel.org/r/20240619003257.6138-7-shannon.nelson@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Shannon Nelson authored and Jakub Kicinski committed Jun 20, 2024
1 parent d7f9bc6 commit 55a3982
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/net/ethernet/pensando/ionic/ionic_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ void ionic_doorbell_napi_work(struct work_struct *work)
{
struct ionic_qcq *qcq = container_of(work, struct ionic_qcq,
doorbell_napi_work);
ionic_napi_schedule_do_softirq(&qcq->napi);
unsigned long now, then, dif;

now = READ_ONCE(jiffies);
then = qcq->q.dbell_jiffies;
dif = now - then;

if (dif > qcq->q.dbell_deadline)
ionic_napi_schedule_do_softirq(&qcq->napi);
}

static int ionic_get_preferred_cpu(struct ionic *ionic,
Expand Down

0 comments on commit 55a3982

Please sign in to comment.