Re: GRU driver feedback

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nick Piggin
Date: Wednesday, July 23, 2008 - 7:41 pm

On Thursday 24 July 2008 00:12, Nick Piggin wrote:


Couple of other things I noticed today before I launch into the mmu
notifier and TLB invalidate code proper.

- gru_invalidate_range_end -- atomic_dec can filter into wake_up_all, past
  the spin_lock in __wake_up, and past the loading of the list of tasks. So
  you can lose a wakeup I believe (not on x86, but on ia64 with release
  ordering spinlocks it would be possible). atomic_dec_and_test should do
  the trick, and you might also want to consider memory ordering of the
  atomic_inc (haven't really looked, but it seems quite suspicious to allow
  it be reordered).

- you seem to be using cache flushes and memory barriers in different ways
  but each to push out things to the GRU device. For example start_instruction
  does a wmb() then a store, then a CPU cache flush.

  I'm lost as to how the mmio protocol actually works (not the low level
  protocol, but exactly what cache attributes are used, and how the CPU
  pushes things to the device and vice versa).

  For example, if you are using wmb(), this I think implies you are using
  UC or WC memory to map the device, in which case I don't see why you need
  the gru_flush_cache (which would suggest WB memory). Is this documented
  somewhere?

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
GRU driver feedback, Nick Piggin, (Wed Jul 23, 7:12 am)
Re: GRU driver feedback, Nick Piggin, (Wed Jul 23, 7:41 pm)
Re: GRU driver feedback, Jack Steiner, (Wed Jul 23, 8:26 pm)
Re: GRU driver feedback, Nick Piggin, (Wed Jul 23, 11:52 pm)
Re: GRU driver feedback, Jack Steiner, (Mon Jul 28, 10:36 am)
Re: GRU driver feedback, Jack Steiner, (Mon Jul 28, 10:44 am)
Re: GRU driver feedback, Nick Piggin, (Mon Jul 28, 7:00 pm)
Re: GRU driver feedback, Robin Holt, (Tue Jul 29, 11:53 am)
Re: GRU driver feedback, Nick Piggin, (Tue Jul 29, 10:50 pm)
Re: GRU driver feedback, Nick Piggin, (Thu Jul 31, 12:14 am)
Re: GRU driver feedback, Jack Steiner, (Thu Jul 31, 5:40 am)
Re: GRU driver feedback, Hugh Dickins, (Fri Aug 1, 5:11 am)
Re: GRU driver feedback, Jack Steiner, (Fri Aug 1, 1:09 pm)