home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.arch      Apparently more than just beeps & boops      131,241 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 130,987 of 131,241   
   EricP to Anton Ertl   
   Re: Inverted Page Tables   
   06 Feb 26 09:29:08   
   
   From: ThatWouldBeTelling@thevillage.com   
      
   Anton Ertl wrote:   
   > Robert Finch  writes:   
   >> On 2026-02-01 12:49 p.m., EricP wrote:   
   >>> Simpler to have create process assign a new ASID by incrementing   
   >>> an unsigned up counter that starts at 1. When you hit its max then reset   
   >>> to 1 and clear the whole IVT for all non-zero ASID entries in one pass.   
   >>>   
   >>>   
   >> A garbage collection approach may work for removed entries. It might be   
   >> a complicated state machine though to do in HW. It could look for   
   >> invalid or entries with defunct ASIDs.   
   >   
   > AFAIK the approach outlined by EricP has been used in commercial   
   > hardware.  It's simple, and if there are enough ASIDs, cheap (because   
   > resets are rare).  So better add more bits to the ASIDs than introduce   
   complicated machinery for reclaiming ASIDs.   
   >   
   > - anton   
      
   The method I described before was a bit brute force, as it looks like   
   it has to stall the whole system while it erases the old ASIDs.   
   It is inefficient as it erases all ASIDs including ones recently assigned.   
      
   One issue with invalidating ASIDs is that the L1-TLB may be fully   
   associative, the L2-TLB often are set associative.   
   While a a full assoc TLB can invalidate multiple matching entries in   
   1 clock, the set assoc TLB requires a scan doing a read-compare-write   
   operation on all the ways in each set, taking 2 or more clocks per set.   
   So an L2-TLB with 512 sets could take 1024 clocks or more to complete   
   an ASID shoot down.   
      
   This would also cause all running processes to have a flurry of TLB misses   
   as they reload the entries just purged.   
      
   I would want something soother, continuous, that usually didn't need to   
   stall the whole system, and only recycles the oldest ASIDs.   
      
   Something like, split the ASIDs into 4 groups using the high 2 msb.   
   As the ASID counter increments from group N to group N+1, it initiates an   
   invalidate of group N+2, such that it retains the recent ASIDs in group N   
   and N-1. And this is circular so when it starts assigning in G3 it   
   initiates the invalidate of G0. The invalidate is also asynchronous,   
   so the system can continue to run and assign ASIDs while it invalidates   
   the next group ahead (there are some interlocks waiting for ACK's).   
      
   e.g. Say the ASID counter is 7 bits so 4 groups of 32 IDs, called G0..G3.   
   The current assignment ASID counter = 31 in G1.   
   When its increments to 32 in G2, it begins invalidating all group G3 ids   
   in the range 96..128. Any processes currently using ASIDs in the G3 range   
   have their ASID invalidated, and when they next run will assign a new id   
   in the current assignment group. All processes in groups G0 and G1 are   
   unaffected by this ASID recycling. Core broadcasts an IPI Interprocessor   
   Interrupt to all other cores to shoot down all group G3 ASIDs.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca