1. 01 Mar, 2018 1 commit
    • Chris Wilson's avatar
      lib: Provide an accelerated routine for readback from WC · 6a06d014
      Chris Wilson authored
      Reading from WC is awfully slow as each access is uncached and so
      performed synchronously, stalling for the memory load. x86 did introduce
      some new instructions in SSE 4.1 to provide a small internal buffer to
      accelerate reading back a cacheline at a time from uncached memory, for
      this purpose.
      
      v2: Don't be lazy and handle misalignment.
      v3: Switch out of sse41 before emitting the generic memcpy routine
      v4: Replace opencoded memcpy_from_wc
      v5: Always flush the internal buffer before use (Eric)
      v6: Assume bulk moves, so check for dst alignment.
      v7: Use _mm_fence for _buitlin_ia32_mfence for consistency, remove
      superfluous defines (Ville)
      Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Eric Anholt <eric@anholt.net>
      Reviewed-by: Ville Syrjälä's avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      6a06d014
  2. 08 Sep, 2017 1 commit
  3. 08 May, 2017 1 commit
  4. 04 Jan, 2017 2 commits
  5. 01 Dec, 2016 1 commit
  6. 29 Nov, 2016 1 commit
  7. 22 Nov, 2016 1 commit
    • Chris Wilson's avatar
      igt/gem_mmap_gtt: Silence compile warning for !sse4.1 · cddf9960
      Chris Wilson authored
      gem_mmap_gtt.c: In function ‘test_huge_copy’:
      gem_mmap_gtt.c:589:4: warning: passing argument 2 of ‘copy_wc_page’ from incompatible pointer type [enabled by default]
          copy_wc_page(page, a + PAGE_SIZE*i);
          ^
      gem_mmap_gtt.c:503:13: note: expected ‘const uint32_t *’ but argument is of type ‘char *’
       static void copy_wc_page(uint32_t *dst, const uint32_t *src)
                   ^
      gem_mmap_gtt.c:601:4: warning: passing argument 2 of ‘copy_wc_page’ from incompatible pointer type [enabled by default]
          copy_wc_page(page, b + PAGE_SIZE*i);
          ^
      gem_mmap_gtt.c:503:13: note: expected ‘const uint32_t *’ but argument is of type ‘char *’
       static void copy_wc_page(uint32_t *dst, const uint32_t *src)
      Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
      cddf9960
  8. 10 Nov, 2016 2 commits
  9. 07 Nov, 2016 1 commit
  10. 22 Oct, 2016 1 commit
  11. 01 Aug, 2016 3 commits
  12. 03 Jun, 2016 1 commit
  13. 18 Feb, 2016 1 commit
  14. 19 Jan, 2016 1 commit
  15. 08 Jan, 2016 3 commits
  16. 07 Jan, 2016 1 commit
  17. 12 Nov, 2015 1 commit
  18. 03 Nov, 2015 1 commit
  19. 12 Oct, 2015 1 commit
  20. 09 Oct, 2015 3 commits
  21. 11 Sep, 2015 1 commit
  22. 21 Aug, 2015 1 commit
  23. 14 Aug, 2015 1 commit
  24. 08 May, 2015 2 commits
  25. 27 Apr, 2015 1 commit
  26. 14 Apr, 2015 2 commits
  27. 04 Nov, 2014 1 commit
  28. 08 Sep, 2014 1 commit
  29. 21 Jun, 2014 1 commit
  30. 12 Jun, 2014 1 commit
    • Chris Wilson's avatar
      igt/gem_mmap_gtt: Exercise concurrent pagefaulting · d242f2e2
      Chris Wilson authored
      This should hit the BUG inside remap_pfn_range in
      
      commit c5158fabeaf53ed2c614c3333aaa4b3cce80f500
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Tue Jun 10 12:14:41 2014 +0100
      
      [   27.767634] kernel BUG at mm/memory.c:2315!
      [   27.767655] invalid opcode: 0000 [#1] SMP
      [   27.767679] Modules linked in: cpufreq_userspace cpufreq_powersave cpufreq_stats cpufreq_conservative binfmt_misc nfs lockd fscache sunrpc hid_generic usbhid hid x86_pkg_temp_thermal microcode i2c_i801 lpc_ich mfd_core battery acpi_cpufreq evdev processor ac loop ehci_pci xhci_hcd ehci_hcd sr_mod usbcore cdrom usb_common fan thermal
      [   27.767872] CPU: 3 PID: 912 Comm: gem_mmap_gtt Not tainted 3.15.0-rc8+ #953
      [   27.767903] Hardware name: Intel Corporation Shark Bay Client platform/Flathead Creek Crb, BIOS HSWLPTU1.86C.0109.R03.1301282055 01/28/2013
      [   27.767956] task: ffff880448415010 ti: ffff88044d22c000 task.ti: ffff88044d22c000
      [   27.767988] RIP: 0010:[<ffffffff81130734>]  [<ffffffff81130734>] remap_pfn_range+0x2a4/0x400
      [   27.768033] RSP: 0000:ffff88044d22fc28  EFLAGS: 00010282
      [   27.768057] RAX: 0000000000020002 RBX: 00000000000a3b57 RCX: ffff880448b73fe8
      [   27.768088] RDX: 0000000000000002 RSI: ffff880000000000 RDI: ffffea000efe8158
      [   27.768119] RBP: ffff88044d22fcd8 R08: 00007fc7b57fe000 R09: 00007fc7b57fe000
      [   27.768150] R10: 00000000000001fd R11: 0000000000000a9a R12: ffffea000efe8128
      [   27.768180] R13: 0000000000000001 R14: 00007fc7b57fd000 R15: 800000000000002f
      [   27.768212] FS:  00007fc7977fc700(0000) GS:ffff88045e380000(0000) knlGS:0000000000000000
      [   27.768246] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   27.768272] CR2: 00007fc7b67fd000 CR3: 000000044866c000 CR4: 00000000001407e0
      [   27.768303] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [   27.768333] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [   27.768363] Stack:
      [   27.768374]  ffff880448bbb6f8 00000000ffffffff 00007fc7b57fdfff 00007fc7b57fdfff
      [   27.768414]  00007fc7b57fe000 ffff88044866c7f8 ffff8804496b08f0 00007fc7b57fdfff
      [   27.768454]  fffffff8038ee35a 0000000000001000 ffff88044c208180 00007fc7b57fe000
      [   27.768494] Call Trace:
      [   27.768511]  [<ffffffff81365277>] i915_gem_fault+0x337/0x340
      [   27.768538]  [<ffffffff8112d3c4>] __do_fault+0x34/0x70
      [   27.768565]  [<ffffffff8109088e>] ? wake_up_process+0x1e/0x40
      [   27.768592]  [<ffffffff8113015c>] do_shared_fault.isra.96+0x2c/0x1f0
      [   27.768623]  [<ffffffff81502405>] ? rwsem_down_read_failed+0xe5/0x130
      [   27.768654]  [<ffffffff810a2519>] ? __rwsem_do_wake+0x129/0x160
      [   27.768682]  [<ffffffff81131085>] handle_mm_fault+0x2b5/0xb80
      [   27.768712]  [<ffffffff81270a64>] ? call_rwsem_down_read_failed+0x14/0x30
      [   27.768745]  [<ffffffff81036c67>] __do_page_fault+0x167/0x4c0
      [   27.768774]  [<ffffffff8109a540>] ? pick_next_task_fair+0x700/0x870
      [   27.768804]  [<ffffffff814ff23b>] ? __schedule+0x27b/0x860
      [   27.768831]  [<ffffffff81036fec>] do_page_fault+0xc/0x10
      [   27.768857]  [<ffffffff815034a2>] page_fault+0x22/0x30
      [   27.768881] Code: 4d 85 ed 49 0f 44 d7 80 cc 02 49 81 c6 00 10 00 00 48 83 c3 01 48 83 c1 08 48 09 d0 48 89 41 f8 4d 39 f0 74 32 48 83 39 00 74 c4 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 48 39 37 75 63 48 8b 45 c8
      [   27.769081] RIP  [<ffffffff81130734>] remap_pfn_range+0x2a4/0x400
      [   27.769113]  RSP <ffff88044d22fc28>
      Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
      d242f2e2