Thread (7 messages) 7 messages, 4 authors, 2019-08-26

Re: [PATCH bpf] nfp: bpf: fix latency bug when updating stack index register

From: Song Liu <hidden>
Date: 2019-08-26 05:37:03
Also in: bpf

On Fri, Aug 23, 2019 at 7:04 PM Jakub Kicinski
[off-list ref] wrote:
From: Jiong Wang <redacted>

NFP is using Local Memory to model stack. LM_addr could be used as base of
a 16 32-bit word region of Local Memory. Then, if the stack offset is
beyond the current region, the local index needs to be updated. The update
needs at least three cycles to take effect, therefore the sequence normally
looks like:

  local_csr_wr[ActLMAddr3, gprB_5]
  nop
  nop
  nop

If the local index switch happens on a narrow loads, then the instruction
preparing value to zero high 32-bit of the destination register could be
counted as one cycle, the sequence then could be something like:

  local_csr_wr[ActLMAddr3, gprB_5]
  nop
  nop
  immed[gprB_5, 0]

However, we have zero extension optimization that zeroing high 32-bit could
be eliminated, therefore above IMMED insn won't be available for which case
the first sequence needs to be generated.

Fixes: 0b4de1ff19bf ("nfp: bpf: eliminate zero extension code-gen")
Signed-off-by: Jiong Wang <redacted>
Reviewed-by: Jakub Kicinski <redacted>
I haven't looked into the code yet. But ^^^ should be

Signed-off-by: Jakub Kicinski <redacted>

right?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help