The Pedigree Project 0.1
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
LocalApicTlbShootdown Class Reference

#include <LocalApicTlbShootdown.h>

+ Collaboration diagram for LocalApicTlbShootdown:

Classes

struct  Service
 

Public Member Functions

bool tryAcquire ()
 
bool publish (uintptr_t address, size_t processor, size_t processorCount, uint64_t expected=~uint64_t(0))
 
bool beginService (size_t processor, Service &service)
 
bool finishService (Service &service)
 
bool complete () const
 
void close ()
 
bool drained () const
 
bool release ()
 
bool owned () const
 
bool retainedClosed () const
 
size_t generation () const
 
uintptr_t address () const
 
uint64_t expectedMask () const
 
uint64_t acknowledgedMask () const
 
size_t servicing () const
 

Static Public Member Functions

static constexpr bool supportsContext (ExecutionContext context)
 
static constexpr bool onlyCurrentProcessorServiceable (size_t processorCount, size_t terminalProcessors)
 

Static Public Attributes

static constexpr size_t MaxProcessors = 64
 

Private Member Functions

bool revalidateServiceClaim (size_t processor, size_t generation, uintptr_t address, size_t serving, size_t acknowledged, Service &service)
 
bool selectNextGeneration (size_t &generation) const
 
uint64_t acknowledgedMask (size_t generation) const
 
bool allAcknowledged (size_t generation, uint64_t expected) const
 

Static Private Member Functions

static constexpr bool isServing (size_t token)
 
static constexpr size_t acknowledgedToken (size_t generation)
 
static constexpr size_t servingToken (size_t generation)
 
static bool processorMask (size_t processorCount, uint64_t &mask)
 

Private Attributes

Atomic< bool > m_Owner
 
Atomic< size_t > m_Generation
 
Atomic< size_t > m_NextGeneration
 
Atomic< uintptr_t > m_Address
 
Atomic< uint64_t > m_Expected
 
Atomic< size_t > m_ProcessorState [MaxProcessors]
 

Static Private Attributes

static constexpr size_t ServingBit = 1
 
static constexpr size_t MaxGeneration = ~size_t(0) >> 1
 

Friends

class LocalApicTlbShootdownTestPeer
 

Detailed Description

Allocation-free publication state for one synchronous TLB shootdown.

A processor which is spinning with maskable interrupts disabled can service the published transaction explicitly. Service leases keep a completed generation from being reused while an old observer can still acknowledge it.

Definition at line 272 of file LocalApicTlbShootdown.h.

Constructor & Destructor Documentation

◆ LocalApicTlbShootdown()

LocalApicTlbShootdown::LocalApicTlbShootdown ( )
inline

Definition at line 291 of file LocalApicTlbShootdown.h.

Member Function Documentation

◆ acknowledgedMask() [1/2]

uint64_t LocalApicTlbShootdown::acknowledgedMask ( ) const
inline

Definition at line 428 of file LocalApicTlbShootdown.h.

◆ acknowledgedMask() [2/2]

uint64_t LocalApicTlbShootdown::acknowledgedMask ( size_t  generation) const
inlineprivate

Definition at line 495 of file LocalApicTlbShootdown.h.

◆ acknowledgedToken()

static constexpr size_t LocalApicTlbShootdown::acknowledgedToken ( size_t  generation)
inlinestaticconstexprprivate

Definition at line 453 of file LocalApicTlbShootdown.h.

◆ address()

uintptr_t LocalApicTlbShootdown::address ( ) const
inline

Definition at line 420 of file LocalApicTlbShootdown.h.

◆ allAcknowledged()

bool LocalApicTlbShootdown::allAcknowledged ( size_t  generation,
uint64_t  expected 
) const
inlineprivate

Definition at line 506 of file LocalApicTlbShootdown.h.

◆ beginService()

bool LocalApicTlbShootdown::beginService ( size_t  processor,
Service &  service 
)
inline

Definition at line 341 of file LocalApicTlbShootdown.h.

◆ close()

void LocalApicTlbShootdown::close ( )
inline

Definition at line 388 of file LocalApicTlbShootdown.h.

◆ complete()

bool LocalApicTlbShootdown::complete ( ) const
inline

Definition at line 381 of file LocalApicTlbShootdown.h.

◆ drained()

bool LocalApicTlbShootdown::drained ( ) const
inline

Definition at line 392 of file LocalApicTlbShootdown.h.

◆ expectedMask()

uint64_t LocalApicTlbShootdown::expectedMask ( ) const
inline

Definition at line 424 of file LocalApicTlbShootdown.h.

◆ finishService()

bool LocalApicTlbShootdown::finishService ( Service &  service)
inline

Definition at line 366 of file LocalApicTlbShootdown.h.

◆ generation()

size_t LocalApicTlbShootdown::generation ( ) const
inline

Definition at line 416 of file LocalApicTlbShootdown.h.

◆ isServing()

static constexpr bool LocalApicTlbShootdown::isServing ( size_t  token)
inlinestaticconstexprprivate

Definition at line 449 of file LocalApicTlbShootdown.h.

◆ onlyCurrentProcessorServiceable()

static constexpr bool LocalApicTlbShootdown::onlyCurrentProcessorServiceable ( size_t  processorCount,
size_t  terminalProcessors 
)
inlinestaticconstexpr

Definition at line 298 of file LocalApicTlbShootdown.h.

◆ owned()

bool LocalApicTlbShootdown::owned ( ) const
inline

Definition at line 408 of file LocalApicTlbShootdown.h.

◆ processorMask()

static bool LocalApicTlbShootdown::processorMask ( size_t  processorCount,
uint64_t &  mask 
)
inlinestaticprivate

Definition at line 516 of file LocalApicTlbShootdown.h.

◆ publish()

bool LocalApicTlbShootdown::publish ( uintptr_t  address,
size_t  processor,
size_t  processorCount,
uint64_t  expected = ~uint64_t(0) 
)
inline

Definition at line 307 of file LocalApicTlbShootdown.h.

◆ release()

bool LocalApicTlbShootdown::release ( )
inline

Definition at line 401 of file LocalApicTlbShootdown.h.

◆ retainedClosed()

bool LocalApicTlbShootdown::retainedClosed ( ) const
inline

Definition at line 412 of file LocalApicTlbShootdown.h.

◆ revalidateServiceClaim()

bool LocalApicTlbShootdown::revalidateServiceClaim ( size_t  processor,
size_t  generation,
uintptr_t  address,
size_t  serving,
size_t  acknowledged,
Service &  service 
)
inlineprivate

Definition at line 461 of file LocalApicTlbShootdown.h.

◆ selectNextGeneration()

bool LocalApicTlbShootdown::selectNextGeneration ( size_t &  generation) const
inlineprivate

Definition at line 476 of file LocalApicTlbShootdown.h.

◆ servicing()

size_t LocalApicTlbShootdown::servicing ( ) const
inline

Definition at line 433 of file LocalApicTlbShootdown.h.

◆ servingToken()

static constexpr size_t LocalApicTlbShootdown::servingToken ( size_t  generation)
inlinestaticconstexprprivate

Definition at line 457 of file LocalApicTlbShootdown.h.

◆ supportsContext()

static constexpr bool LocalApicTlbShootdown::supportsContext ( ExecutionContext  context)
inlinestaticconstexpr

Definition at line 294 of file LocalApicTlbShootdown.h.

◆ tryAcquire()

bool LocalApicTlbShootdown::tryAcquire ( )
inline

Definition at line 303 of file LocalApicTlbShootdown.h.

Friends And Related Symbol Documentation

◆ LocalApicTlbShootdownTestPeer

friend class LocalApicTlbShootdownTestPeer
friend

Definition at line 444 of file LocalApicTlbShootdown.h.

Member Data Documentation

◆ m_Address

Atomic<uintptr_t> LocalApicTlbShootdown::m_Address
private

Definition at line 527 of file LocalApicTlbShootdown.h.

◆ m_Expected

Atomic<uint64_t> LocalApicTlbShootdown::m_Expected
private

Definition at line 528 of file LocalApicTlbShootdown.h.

◆ m_Generation

Atomic<size_t> LocalApicTlbShootdown::m_Generation
private

Definition at line 525 of file LocalApicTlbShootdown.h.

◆ m_NextGeneration

Atomic<size_t> LocalApicTlbShootdown::m_NextGeneration
private

Definition at line 526 of file LocalApicTlbShootdown.h.

◆ m_Owner

Atomic<bool> LocalApicTlbShootdown::m_Owner
private

Definition at line 524 of file LocalApicTlbShootdown.h.

◆ m_ProcessorState

Atomic<size_t> LocalApicTlbShootdown::m_ProcessorState[MaxProcessors]
private

Definition at line 529 of file LocalApicTlbShootdown.h.

◆ MaxGeneration

constexpr size_t LocalApicTlbShootdown::MaxGeneration = ~size_t(0) >> 1
staticconstexprprivate

Definition at line 447 of file LocalApicTlbShootdown.h.

◆ MaxProcessors

constexpr size_t LocalApicTlbShootdown::MaxProcessors = 64
staticconstexpr

Definition at line 274 of file LocalApicTlbShootdown.h.

◆ ServingBit

constexpr size_t LocalApicTlbShootdown::ServingBit = 1
staticconstexprprivate

Definition at line 446 of file LocalApicTlbShootdown.h.


The documentation for this class was generated from the following file: