Re: Regression found with link TRB activation patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 17, 2010 at 05:47:20PM +0800, Xu, Andiry wrote:
> > I have some notes on what will need to be done to the xHCI driver to
> be
> > compliant with the xHCI 1.0 specification.  I'll try to post them in
> the
> > next couple of days.
> > 
> > I'm most concerned about the TD fragments change because TD fragments
> > cannot span segment boundaries, so having only a link TRB at the end
> of
> > the segment will not suffice.  (We can't insert no-ops before the link
> > TRB because no-ops cannot be chained.)  I think the solution is to end
> > the segment early with a link TRB, and make the dequeue pointer
> function
> > change the link TRB back into a normal TRB once the hardware is done
> > with that TD.  But the room_on_ring() function is going to have to
> > calculate where to break the transfer into TD fragments and allocate
> new
> > segments if needed.  I think that will be the most complex change for
> > the 1.0 xHCI specification.
> > 
> 
> Yes. TD fragment is the most difficult part as I see. I'm afraid there
> will be some judgments in the future code such as "if (HC_VERSION(reg)
> == 0x0100)" to maintain compatibility. I wonder if you have some good
> solutions to avoid this.

I think that 0.96 xHCI hosts will work fine with TD fragments.  There
may be other places where the 1.0 xHCI spec is more strict than the 0.96
spec, and the xHCI driver can just follow the 1.0 specification.  I
think there will be more if statements in the code though, and I'm not
sure if we can avoid them.

> Also, Section 4.9.4 states driver should
> maximize the number of Events processed before writing the ERDP, not
> write ERDP for every event. Do I need to modify handle_tx_event() to
> comply with this statement?

Yes, you're correct.  I implemented your suggestion for some performance
patches I've been working on.  In general, reducing register reads
whenever possible is the best solution.  The xHCI architect mentioned
that the goal was to have a register interface that only needed to be
written to during normal operations, to avoid the long wait for the PCI
register read.

I hope to send out the performance patches soon, but I think they may
have to wait until I come back.  They're on the xhci-perf branch if
you're interested.  I've been setting the interrupt moderation interval
to 0 with `sudo modprobe xhci-hcd irq_interval=0`.  I've also found that
turning off all kernel debugging (memory leak checkers, spinlock
debugging, etc) really really helps performance.

Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux