* [PATCH] event/dlb2: remove unnecessary timer call
@ 2023-12-13 11:48 Bruce Richardson
2023-12-13 15:22 ` Sevincer, Abdullah
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Bruce Richardson @ 2023-12-13 11:48 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, Abdullah Sevincer
We only need to consult the timer value when the driver waits for a
timeout, so skip making the call to get the current timer/TSC value if
the timeout is zero, as no wait will ever be done.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/event/dlb2/dlb2.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 050ace0904..f395ef0cb7 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -3966,7 +3966,8 @@ dlb2_hw_dequeue_sparse(struct dlb2_eventdev *dlb2,
else
timeout = dlb2->global_dequeue_wait_ticks;
- start_ticks = rte_get_timer_cycles();
+ if (timeout != 0)
+ start_ticks = rte_get_timer_cycles();
use_scalar = use_scalar || (max_num & 0x3);
@@ -4114,7 +4115,8 @@ dlb2_hw_dequeue(struct dlb2_eventdev *dlb2,
else
timeout = dlb2->global_dequeue_wait_ticks;
- start_ticks = rte_get_timer_cycles();
+ if (timeout != 0)
+ start_ticks = rte_get_timer_cycles();
while (num < max_num) {
struct dlb2_dequeue_qe qes[DLB2_NUM_QES_PER_CACHE_LINE];
--
2.40.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] event/dlb2: remove unnecessary timer call
2023-12-13 11:48 [PATCH] event/dlb2: remove unnecessary timer call Bruce Richardson
@ 2023-12-13 15:22 ` Sevincer, Abdullah
2023-12-14 6:58 ` Jerin Jacob
2023-12-13 15:41 ` Aaron Conole
2023-12-13 16:50 ` Aaron Conole
2 siblings, 1 reply; 7+ messages in thread
From: Sevincer, Abdullah @ 2023-12-13 15:22 UTC (permalink / raw)
To: Richardson, Bruce, dev
Acked-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] event/dlb2: remove unnecessary timer call
2023-12-13 11:48 [PATCH] event/dlb2: remove unnecessary timer call Bruce Richardson
2023-12-13 15:22 ` Sevincer, Abdullah
@ 2023-12-13 15:41 ` Aaron Conole
2023-12-13 16:50 ` Aaron Conole
2 siblings, 0 replies; 7+ messages in thread
From: Aaron Conole @ 2023-12-13 15:41 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Abdullah Sevincer
Bruce Richardson <bruce.richardson@intel.com> writes:
> We only need to consult the timer value when the driver waits for a
> timeout, so skip making the call to get the current timer/TSC value if
> the timeout is zero, as no wait will ever be done.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Recheck-request: github-robot
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] event/dlb2: remove unnecessary timer call
2023-12-13 11:48 [PATCH] event/dlb2: remove unnecessary timer call Bruce Richardson
2023-12-13 15:22 ` Sevincer, Abdullah
2023-12-13 15:41 ` Aaron Conole
@ 2023-12-13 16:50 ` Aaron Conole
2023-12-13 17:10 ` Bruce Richardson
2 siblings, 1 reply; 7+ messages in thread
From: Aaron Conole @ 2023-12-13 16:50 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Abdullah Sevincer
Bruce Richardson <bruce.richardson@intel.com> writes:
> We only need to consult the timer value when the driver waits for a
> timeout, so skip making the call to get the current timer/TSC value if
> the timeout is zero, as no wait will ever be done.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Had a bad config value - retrying again.
(Apologies to Bruce for the noise on this patch)
Recheck-request: github-robot
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] event/dlb2: remove unnecessary timer call
2023-12-13 16:50 ` Aaron Conole
@ 2023-12-13 17:10 ` Bruce Richardson
2023-12-13 21:31 ` Aaron Conole
0 siblings, 1 reply; 7+ messages in thread
From: Bruce Richardson @ 2023-12-13 17:10 UTC (permalink / raw)
To: Aaron Conole; +Cc: dev, Abdullah Sevincer
On Wed, Dec 13, 2023 at 11:50:46AM -0500, Aaron Conole wrote:
> Bruce Richardson <bruce.richardson@intel.com> writes:
>
> > We only need to consult the timer value when the driver waits for a
> > timeout, so skip making the call to get the current timer/TSC value if
> > the timeout is zero, as no wait will ever be done.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
>
> Had a bad config value - retrying again.
>
> (Apologies to Bruce for the noise on this patch)
>
No problem!
We are going for the record for best-checked patch in DPDK history, right? :-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] event/dlb2: remove unnecessary timer call
2023-12-13 17:10 ` Bruce Richardson
@ 2023-12-13 21:31 ` Aaron Conole
0 siblings, 0 replies; 7+ messages in thread
From: Aaron Conole @ 2023-12-13 21:31 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Abdullah Sevincer
Bruce Richardson <bruce.richardson@intel.com> writes:
> On Wed, Dec 13, 2023 at 11:50:46AM -0500, Aaron Conole wrote:
>> Bruce Richardson <bruce.richardson@intel.com> writes:
>>
>> > We only need to consult the timer value when the driver waits for a
>> > timeout, so skip making the call to get the current timer/TSC value if
>> > the timeout is zero, as no wait will ever be done.
>> >
>> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>> > ---
>>
>> Had a bad config value - retrying again.
>>
>> (Apologies to Bruce for the noise on this patch)
>>
> No problem!
> We are going for the record for best-checked patch in DPDK history, right? :-)
Absolutely! If we're removing a call, best be safe.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] event/dlb2: remove unnecessary timer call
2023-12-13 15:22 ` Sevincer, Abdullah
@ 2023-12-14 6:58 ` Jerin Jacob
0 siblings, 0 replies; 7+ messages in thread
From: Jerin Jacob @ 2023-12-14 6:58 UTC (permalink / raw)
To: Sevincer, Abdullah; +Cc: Richardson, Bruce, dev
On Thu, Dec 14, 2023 at 10:28 AM Sevincer, Abdullah
<abdullah.sevincer@intel.com> wrote:
>
> Acked-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
Updated the git commit as follows and applied to
dpdk-next-net-eventdev/for-main. Thanks
event/dlb2: remove unnecessary timer call
Consult the timer value only when the driver waits for a
timeout, so skip making the call to get the current timer/TSC value if
the timeout is zero, as no wait will ever be done.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-12-14 6:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-13 11:48 [PATCH] event/dlb2: remove unnecessary timer call Bruce Richardson
2023-12-13 15:22 ` Sevincer, Abdullah
2023-12-14 6:58 ` Jerin Jacob
2023-12-13 15:41 ` Aaron Conole
2023-12-13 16:50 ` Aaron Conole
2023-12-13 17:10 ` Bruce Richardson
2023-12-13 21:31 ` Aaron Conole
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).