Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau....

34
Supreet Pal Singh EVoC Student - Nouveau

Transcript of Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau....

Page 1: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Supreet Pal SinghEVoC Student - Nouveau

Page 2: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Contents● EVoC Project

● EVoC Experience and Suggestions

Page 3: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

EVoC Project

Implementing a Software Scripting Engine on Fermi architecture based NVIDIA GPUs to achieve safe memory reclocking.

Page 4: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

How did I get to this?

1. Web Developer2. KDE contributor 3. No clue about X development

Page 5: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

The path

● Onsite internships- Mozilla- Google- Apple

● GSoC deadline crossed

Page 6: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Two options

1. Android App Development2. Nouveau

Page 7: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

The Project

● Buying a new GPU - First NVIDIA card● Fermi and Kepler● Fermi memory reclocking

Page 8: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

The problem with Fermi

Page 9: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

nv50 laptops -> reclock memory and engines.

- Save power- Default clock speed : Medium

Page 10: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

nva3 : - load based reclocking- Default clock speed : 1/3 to 1/2- Low performance on Nouveau

Page 11: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

FERMI

- Default clock speed : 10%!! - Miserable performance

Page 12: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Process of Reclocking

● nv50 style● Put card off the bus● wait and write MMIO registers

Page 13: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

The main issue

● nv50 used HWSQ ( HardWare SeQuencer)● HWSQ removed on Fermi● Replaced by PDAEMON

Page 14: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

PDAEMON

● Full access to the registers● Capable of IRQs● Used for Hardware monitoring and

Reclocking● ISA: FµC (flexible microcode)

Page 15: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Open-Source PDAEMON

● Work done by Martin Peres ~mupuf- Host -> PDAEMON Communication- Fan Management- Works on nva3 to nvd9- Should work on Kepler

Page 16: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

My Proposed Work

1. PDAEMON -> Host Communication2. HWSQ replacement3. Documentation

Page 17: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

PDAEMON -> Host

● Ring Buffer - *GET / *PUT- *PUT writes - *GET reads

● Each process sends 4 params 1. Process Id

2. Message Id3. Payload Size4. Payload pointer

Page 18: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Basic checks

● Stop writing if buffer not read● Stop reading if buffer empty● Do not read if writing not complete● Write if reading not complete● Wrap around

Page 19: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Status

● PDAEMON -> HOST - TESTED- MERGED

Page 20: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Fermi Scripting Engine (FSE)

● HWSQ replacement● Capable of memory reclocking

Page 21: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

FSE Implementation Process

1. Understanding HWSQ2. Designing the ISA3. Implementing it in FµC

Page 22: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

FSE Design

1. Full range Delay2. Short range Delay3. MMIO write4. MMIO mask5. MMIO wait6. PDAEMON -> HOST message

Page 23: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Delay Implementation

● Short range:- 16bit Nano seconds- 16bit Micro Seconds

● Full range- 64bit Nano seconds

Page 24: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

● Write- 8bit and 32bit

● Mask● Wait

Page 25: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Send_msg

● Hooks up with PDAEMON->Host● Takes two params

○ SIZE○ MESSAGE

Page 26: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Unexpected Hurdle

● Planned demo for XDC● Unaligned memory access● Implemented ld_32 , ld_16 and ld_08

Page 27: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Current Status

● Most of it tested and working● Send_msg needs to support "msg_id"● Send_msg needs pass testing

Page 28: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Documentation

1. Blogpost introducing Nouveau basics2. Complete EVoC documentation on blog3. Intro.txt by mwk in envytools4. More Documentation for Newbies!

// Beginner's Guide to KDE Development

Page 29: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Wrap Up

1. PDAEMON -> HOST :success2. FSE : send_msg testing left3. Documentation - Intro.txt & blogpost

Page 30: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

EVoC

● Endless Vacation of Code● Propose a 13 week (3 Month) Project● $5000

○ $1000 upfront○ $2000 mid-term○ $2000 completion

● Can start anytime

Page 31: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

EVoC suggestions

● Flexibility == Good● Need more specific rules != Refer GSoC● Selection completely on Mentor● PreRequisites on Wiki● Open Mentors listed on Wiki

Page 32: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Thoughts on proposition by Martin

● Patch requirement compulsory?● Limit a student to 2 EVoCs? NO?!● Limit a student to 1EvoC/year? Yes.● Upfront payment low? Yes.● 3 Month engagement before project? No!

Page 33: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

1. Something for Mentors?2. PUBLICIZE!

Page 34: Supreet Pal Singh - X Window System · 2018. 4. 13. · Supreet Pal Singh EVoC Student - Nouveau. Contents EVoC Project EVoC Experience and Suggestions. EVoC Project Implementing

Links

1. https://gitorious.org/pdaemon2. supreetpal.blogspot.com3. IRC nick: supreet4. Email : [email protected]