Re: [PATCH 01/27] habanalabs/gaudi2: increase user interrupt grace time
On Sun, Feb 12, 2023 at 10:44:28PM +0200, Oded Gabbay wrote: > From: Ofir Bitton > > Currently we support scenarios where a timestamp registration request > of a certain offset is received during the interrupt handling of the > same offset. In this case we give a grace period of up to 100us for > the interrupt handler to finish. > It seems that sometimes the interrupt handling takes more than expected, > and therefore this path should be optimized. Until that happens, let's > increase the grace period in order not to reach timeout which will > cause user call to be rejected. > > Signed-off-by: Ofir Bitton > Reviewed-by: Oded Gabbay > Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka for the whole series.
RE: [PATCH 01/27] habanalabs/gaudi2: increase user interrupt grace time
On Thu, Feb 16, 2023 at 16:24 PM, Oded Gabbay wrote: > > On Thu, Feb 16, 2023 at 12:53 PM Stanislaw Gruszka > wrote: > > > > On Sun, Feb 12, 2023 at 10:44:28PM +0200, Oded Gabbay wrote: > > > @@ -3178,11 +3181,12 @@ static int > > > ts_buff_get_kernel_ts_record(struct hl_mmap_mem_buf *buf, > > > > > > /* irq handling in the middle give it time to > > > finish */ > > > spin_unlock_irqrestore(wait_list_lock, flags); > > > - usleep_range(1, 10); > > > + usleep_range(100, 1000); > > > if (++iter_counter == MAX_TS_ITER_NUM) { > > > dev_err(buf->mmg->dev, > > > - "handling registration interrupt > > > took too long!!\n"); > > > - return -EINVAL; > > > + "Timestamp offest processing > > > + reached timeout of %lld ms\n", > > > > Typo in offest, you can use './scripts/checkpatch.pl --codespell' > > to coughs some of those. > Thanks, I'll fix it in the patch in the tree. > > @Ofir Bitton Can you please take care adding the codespell to our CI ? > Thanks, > Oded I will make sure we run with this option from now on. Thanks, Ofir > > > > > Regards > > Stanislaw > >
Re: [PATCH 01/27] habanalabs/gaudi2: increase user interrupt grace time
On Thu, Feb 16, 2023 at 12:53 PM Stanislaw Gruszka wrote: > > On Sun, Feb 12, 2023 at 10:44:28PM +0200, Oded Gabbay wrote: > > @@ -3178,11 +3181,12 @@ static int ts_buff_get_kernel_ts_record(struct > > hl_mmap_mem_buf *buf, > > > > /* irq handling in the middle give it time to finish > > */ > > spin_unlock_irqrestore(wait_list_lock, flags); > > - usleep_range(1, 10); > > + usleep_range(100, 1000); > > if (++iter_counter == MAX_TS_ITER_NUM) { > > dev_err(buf->mmg->dev, > > - "handling registration interrupt took > > too long!!\n"); > > - return -EINVAL; > > + "Timestamp offest processing reached > > timeout of %lld ms\n", > > Typo in offest, you can use './scripts/checkpatch.pl --codespell' > to coughs some of those. Thanks, I'll fix it in the patch in the tree. @Ofir Bitton Can you please take care adding the codespell to our CI ? Thanks, Oded > > Regards > Stanislaw >
Re: [PATCH 01/27] habanalabs/gaudi2: increase user interrupt grace time
On Sun, Feb 12, 2023 at 10:44:28PM +0200, Oded Gabbay wrote: > @@ -3178,11 +3181,12 @@ static int ts_buff_get_kernel_ts_record(struct > hl_mmap_mem_buf *buf, > > /* irq handling in the middle give it time to finish */ > spin_unlock_irqrestore(wait_list_lock, flags); > - usleep_range(1, 10); > + usleep_range(100, 1000); > if (++iter_counter == MAX_TS_ITER_NUM) { > dev_err(buf->mmg->dev, > - "handling registration interrupt took > too long!!\n"); > - return -EINVAL; > + "Timestamp offest processing reached > timeout of %lld ms\n", Typo in offest, you can use './scripts/checkpatch.pl --codespell' to coughs some of those. Regards Stanislaw