Skip to end of banner
Go to start of banner

WPERF-116: Add new "busy" state to wperf-driver

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Table of Contents

Introduction

This document is related to epic WPERF-25 - Getting issue details... STATUS which covers various issues around wperf-driver improvements.

Add new "busy" state to wperf-driver

See WPERF-116 - Getting issue details... STATUS for more Jira related information about this feature.

Required bahaviour

  1. Ultimatelly remove the call to WdfDeviceInitSetExclusive.

  2. Create a persistent structure inside wperf-driver that capture driver’s “transition” current state, like if it is sampling, counting, if PMU resources are available or not. We want to capture:

    1. [bool flag] If driver is currently “counting” or “sampling” - this will set BUSY state to true.

    2. [IOCTL request no.] Current IOCTL being processed - this is useful to determine in user space if we are actually counting/timeline or sampling or doing some other work.

  3. How IOCTL will set BUSY state?

    1. Some IOCTL will set (and clear after IOCTL is finished) busy state during IOCTL handling only, e.g. PMU_CTL_RESET or IOCTL_PMU_CTL_QUERY_HW_CFG. This is because these “transactions” are pending during IOCTL handle and end after.

    2. Some IOCTLs will set BUSY state

    3. Not all IOCTLs may set bus state as some do not “set in motion” the driver.

  4. Update to driver ↔︎ user-space protocol.

    1. We will send to user-space new set of flags: BUSY flag and at least info about which IOCTL is ongoing.

      1. If BUSY state is true: IOCTL field is valid with IOCTL being processed now.

List of IOCTLs and BUSY state

IOCTL

BUSY state / notes

IOCTL_PMU_CTL_START

IOCTL_PMU_CTL_STOP

IOCTL_PMU_CTL_RESET

IOCTL_PMU_CTL_QUERY_HW_CFG

IOCTL_PMU_CTL_QUERY_SUPP_EVENTS

IOCTL_PMU_CTL_QUERY_VERSION

IOCTL_PMU_CTL_ASSIGN_EVENTS

IOCTL_PMU_CTL_READ_COUNTING

IOCTL_DSU_CTL_INIT

IOCTL_DSU_CTL_READ_COUNTING

IOCTL_DMC_CTL_INIT

IOCTL_DMC_CTL_READ_COUNTING

IOCTL_PMU_CTL_SAMPLE_SET_SRC

IOCTL_PMU_CTL_SAMPLE_START

IOCTL_PMU_CTL_SAMPLE_STOP

IOCTL_PMU_CTL_SAMPLE_GET

<>

  • No labels