Ignore:
Timestamp:
Jul 13, 2017, 3:57:04 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
0720e049, 9a1e509
Parents:
55a68c3 (diff), d6ff3ff (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/kernel.c

    r55a68c3 r3d4b23fa  
    1515//
    1616
    17 #include "startup.h"
    18 
    19 //Start and stop routine for the kernel, declared first to make sure they run first
    20 void kernel_startup(void)  __attribute__(( constructor( STARTUP_PRIORITY_KERNEL ) ));
    21 void kernel_shutdown(void) __attribute__(( destructor ( STARTUP_PRIORITY_KERNEL ) ));
    22 
    23 //Header
    24 #include "kernel_private.h"
     17#include "libhdr.h"
    2518
    2619//C Includes
     
    3528
    3629//CFA Includes
    37 #include "libhdr.h"
     30#include "kernel_private.h"
    3831#include "preemption.h"
     32#include "startup.h"
    3933
    4034//Private includes
     
    4236#include "invoke.h"
    4337
     38//Start and stop routine for the kernel, declared first to make sure they run first
     39void kernel_startup(void)  __attribute__(( constructor( STARTUP_PRIORITY_KERNEL ) ));
     40void kernel_shutdown(void) __attribute__(( destructor ( STARTUP_PRIORITY_KERNEL ) ));
     41
    4442//-----------------------------------------------------------------------------
    4543// Kernel storage
    46 #define KERNEL_STORAGE(T,X) static char X##_storage[sizeof(T)]
     44#define KERNEL_STORAGE(T,X) static char X##Storage[sizeof(T)]
    4745
    4846KERNEL_STORAGE(processorCtx_t, systemProcessorCtx);
     
    5048KERNEL_STORAGE(system_proc_t, systemProcessor);
    5149KERNEL_STORAGE(thread_desc, mainThread);
    52 KERNEL_STORAGE(machine_context_t, mainThread_context);
     50KERNEL_STORAGE(machine_context_t, mainThreadCtx);
    5351
    5452cluster * systemCluster;
     
    5957// Global state
    6058
    61 thread_local processor * this_processor;
    62 
    63 coroutine_desc * this_coroutine(void) {
    64         return this_processor->current_coroutine;
    65 }
    66 
    67 thread_desc * this_thread(void) {
    68         return this_processor->current_thread;
    69 }
     59volatile thread_local processor * this_processor;
     60volatile thread_local coroutine_desc * this_coroutine;
     61volatile thread_local thread_desc * this_thread;
     62volatile thread_local bool preemption_in_progress = 0;
     63volatile thread_local unsigned short disable_preempt_count = 1;
    7064
    7165//-----------------------------------------------------------------------------
    7266// Main thread construction
    7367struct current_stack_info_t {
    74         machine_context_t ctx; 
     68        machine_context_t ctx;
    7569        unsigned int size;              // size of stack
    7670        void *base;                             // base of stack
     
    8276
    8377void ?{}( current_stack_info_t * this ) {
    84         CtxGet( &this->ctx );
     78        CtxGet( this->ctx );
    8579        this->base = this->ctx.FP;
    8680        this->storage = this->ctx.SP;
     
    9185
    9286        this->limit = (void *)(((intptr_t)this->base) - this->size);
    93         this->context = &mainThread_context_storage;
     87        this->context = &mainThreadCtxStorage;
    9488        this->top = this->base;
    9589}
     
    106100
    107101void ?{}( coroutine_desc * this, current_stack_info_t * info) {
    108         (&this->stack){ info }; 
     102        (&this->stack){ info };
    109103        this->name = "Main Thread";
    110104        this->errno_ = 0;
     
    136130void ?{}(processor * this, cluster * cltr) {
    137131        this->cltr = cltr;
    138         this->current_coroutine = NULL;
    139         this->current_thread = NULL;
    140         (&this->terminated){};
     132        (&this->terminated){ 0 };
    141133        this->is_terminated = false;
    142134        this->preemption_alarm = NULL;
    143135        this->preemption = default_preemption();
    144         this->disable_preempt_count = 1;                //Start with interrupts disabled
    145136        this->pending_preemption = false;
    146137
     
    150141void ?{}(processor * this, cluster * cltr, processorCtx_t * runner) {
    151142        this->cltr = cltr;
    152         this->current_coroutine = NULL;
    153         this->current_thread = NULL;
    154         (&this->terminated){};
     143        (&this->terminated){ 0 };
    155144        this->is_terminated = false;
    156         this->disable_preempt_count = 0;
     145        this->preemption_alarm = NULL;
     146        this->preemption = default_preemption();
    157147        this->pending_preemption = false;
     148        this->kernel_thread = pthread_self();
    158149
    159150        this->runner = runner;
    160         LIB_DEBUG_PRINT_SAFE("Kernel : constructing processor context %p\n", runner);
     151        LIB_DEBUG_PRINT_SAFE("Kernel : constructing system processor context %p\n", runner);
    161152        runner{ this };
    162153}
     154
     155LIB_DEBUG_DO( bool validate( alarm_list_t * this ); )
    163156
    164157void ?{}(system_proc_t * this, cluster * cltr, processorCtx_t * runner) {
     
    168161
    169162        (&this->proc){ cltr, runner };
     163
     164        verify( validate( &this->alarms ) );
    170165}
    171166
     
    174169                LIB_DEBUG_PRINT_SAFE("Kernel : core %p signaling termination\n", this);
    175170                this->is_terminated = true;
    176                 wait( &this->terminated );
     171                P( &this->terminated );
     172                pthread_join( this->kernel_thread, NULL );
    177173        }
    178174}
     
    184180
    185181void ^?{}(cluster * this) {
    186        
     182
    187183}
    188184
     
    203199
    204200                thread_desc * readyThread = NULL;
    205                 for( unsigned int spin_count = 0; ! this->is_terminated; spin_count++ ) 
     201                for( unsigned int spin_count = 0; ! this->is_terminated; spin_count++ )
    206202                {
    207203                        readyThread = nextThread( this->cltr );
     
    209205                        if(readyThread)
    210206                        {
     207                                verify( disable_preempt_count > 0 );
     208
    211209                                runThread(this, readyThread);
     210
     211                                verify( disable_preempt_count > 0 );
    212212
    213213                                //Some actions need to be taken from the kernel
     
    225225        }
    226226
    227         signal( &this->terminated );
     227        V( &this->terminated );
     228
    228229        LIB_DEBUG_PRINT_SAFE("Kernel : core %p terminated\n", this);
    229230}
    230231
    231 // runThread runs a thread by context switching 
    232 // from the processor coroutine to the target thread 
     232// runThread runs a thread by context switching
     233// from the processor coroutine to the target thread
    233234void runThread(processor * this, thread_desc * dst) {
    234235        coroutine_desc * proc_cor = get_coroutine(this->runner);
    235236        coroutine_desc * thrd_cor = get_coroutine(dst);
    236        
     237
    237238        //Reset the terminating actions here
    238239        this->finish.action_code = No_Action;
    239240
    240241        //Update global state
    241         this->current_thread = dst;
     242        this_thread = dst;
    242243
    243244        // Context Switch to the thread
     
    246247}
    247248
    248 // Once a thread has finished running, some of 
     249// Once a thread has finished running, some of
    249250// its final actions must be executed from the kernel
    250251void finishRunning(processor * this) {
     
    256257        }
    257258        else if( this->finish.action_code == Release_Schedule ) {
    258                 unlock( this->finish.lock );           
     259                unlock( this->finish.lock );
    259260                ScheduleThread( this->finish.thrd );
    260261        }
     
    289290        processor * proc = (processor *) arg;
    290291        this_processor = proc;
     292        this_coroutine = NULL;
     293        this_thread = NULL;
     294        disable_preempt_count = 1;
    291295        // SKULLDUGGERY: We want to create a context for the processor coroutine
    292296        // which is needed for the 2-step context switch. However, there is no reason
    293         // to waste the perfectly valid stack create by pthread. 
     297        // to waste the perfectly valid stack create by pthread.
    294298        current_stack_info_t info;
    295299        machine_context_t ctx;
     
    300304
    301305        //Set global state
    302         proc->current_coroutine = &proc->runner->__cor;
    303         proc->current_thread = NULL;
     306        this_coroutine = &proc->runner->__cor;
     307        this_thread = NULL;
    304308
    305309        //We now have a proper context from which to schedule threads
    306310        LIB_DEBUG_PRINT_SAFE("Kernel : core %p created (%p, %p)\n", proc, proc->runner, &ctx);
    307311
    308         // SKULLDUGGERY: Since the coroutine doesn't have its own stack, we can't 
    309         // resume it to start it like it normally would, it will just context switch 
    310         // back to here. Instead directly call the main since we already are on the 
     312        // SKULLDUGGERY: Since the coroutine doesn't have its own stack, we can't
     313        // resume it to start it like it normally would, it will just context switch
     314        // back to here. Instead directly call the main since we already are on the
    311315        // appropriate stack.
    312316        proc_cor_storage.__cor.state = Active;
     
    315319
    316320        // Main routine of the core returned, the core is now fully terminated
    317         LIB_DEBUG_PRINT_SAFE("Kernel : core %p main ended (%p)\n", proc, proc->runner); 
     321        LIB_DEBUG_PRINT_SAFE("Kernel : core %p main ended (%p)\n", proc, proc->runner);
    318322
    319323        return NULL;
     
    322326void start(processor * this) {
    323327        LIB_DEBUG_PRINT_SAFE("Kernel : Starting core %p\n", this);
    324        
     328
    325329        pthread_create( &this->kernel_thread, NULL, CtxInvokeProcessor, (void*)this );
    326330
    327         LIB_DEBUG_PRINT_SAFE("Kernel : core %p started\n", this);       
     331        LIB_DEBUG_PRINT_SAFE("Kernel : core %p started\n", this);
    328332}
    329333
     
    331335// Scheduler routines
    332336void ScheduleThread( thread_desc * thrd ) {
    333         if( !thrd ) return;
     337        // if( !thrd ) return;
     338        assert( thrd );
     339        assert( thrd->cor.state != Halted );
     340
     341        verify( disable_preempt_count > 0 );
    334342
    335343        verifyf( thrd->next == NULL, "Expected null got %p", thrd->next );
    336        
    337         lock( &systemProcessor->proc.cltr->lock );
     344
     345        lock( &systemProcessor->proc.cltr->lock DEBUG_CTX2 );
    338346        append( &systemProcessor->proc.cltr->ready_queue, thrd );
    339347        unlock( &systemProcessor->proc.cltr->lock );
     348
     349        verify( disable_preempt_count > 0 );
    340350}
    341351
    342352thread_desc * nextThread(cluster * this) {
    343         lock( &this->lock );
     353        verify( disable_preempt_count > 0 );
     354        lock( &this->lock DEBUG_CTX2 );
    344355        thread_desc * head = pop_head( &this->ready_queue );
    345356        unlock( &this->lock );
     357        verify( disable_preempt_count > 0 );
    346358        return head;
    347359}
    348360
    349 void ScheduleInternal() {
     361void BlockInternal() {
     362        disable_interrupts();
     363        verify( disable_preempt_count > 0 );
    350364        suspend();
    351 }
    352 
    353 void ScheduleInternal( spinlock * lock ) {
     365        verify( disable_preempt_count > 0 );
     366        enable_interrupts( DEBUG_CTX );
     367}
     368
     369void BlockInternal( spinlock * lock ) {
     370        disable_interrupts();
    354371        this_processor->finish.action_code = Release;
    355372        this_processor->finish.lock = lock;
     373
     374        verify( disable_preempt_count > 0 );
    356375        suspend();
    357 }
    358 
    359 void ScheduleInternal( thread_desc * thrd ) {
     376        verify( disable_preempt_count > 0 );
     377
     378        enable_interrupts( DEBUG_CTX );
     379}
     380
     381void BlockInternal( thread_desc * thrd ) {
     382        disable_interrupts();
     383        assert( thrd->cor.state != Halted );
    360384        this_processor->finish.action_code = Schedule;
    361385        this_processor->finish.thrd = thrd;
     386
     387        verify( disable_preempt_count > 0 );
    362388        suspend();
    363 }
    364 
    365 void ScheduleInternal( spinlock * lock, thread_desc * thrd ) {
     389        verify( disable_preempt_count > 0 );
     390
     391        enable_interrupts( DEBUG_CTX );
     392}
     393
     394void BlockInternal( spinlock * lock, thread_desc * thrd ) {
     395        disable_interrupts();
    366396        this_processor->finish.action_code = Release_Schedule;
    367397        this_processor->finish.lock = lock;
    368398        this_processor->finish.thrd = thrd;
     399
     400        verify( disable_preempt_count > 0 );
    369401        suspend();
    370 }
    371 
    372 void ScheduleInternal(spinlock ** locks, unsigned short count) {
     402        verify( disable_preempt_count > 0 );
     403
     404        enable_interrupts( DEBUG_CTX );
     405}
     406
     407void BlockInternal(spinlock ** locks, unsigned short count) {
     408        disable_interrupts();
    373409        this_processor->finish.action_code = Release_Multi;
    374410        this_processor->finish.locks = locks;
    375411        this_processor->finish.lock_count = count;
     412
     413        verify( disable_preempt_count > 0 );
    376414        suspend();
    377 }
    378 
    379 void ScheduleInternal(spinlock ** locks, unsigned short lock_count, thread_desc ** thrds, unsigned short thrd_count) {
     415        verify( disable_preempt_count > 0 );
     416
     417        enable_interrupts( DEBUG_CTX );
     418}
     419
     420void BlockInternal(spinlock ** locks, unsigned short lock_count, thread_desc ** thrds, unsigned short thrd_count) {
     421        disable_interrupts();
    380422        this_processor->finish.action_code = Release_Multi_Schedule;
    381423        this_processor->finish.locks = locks;
     
    383425        this_processor->finish.thrds = thrds;
    384426        this_processor->finish.thrd_count = thrd_count;
     427
     428        verify( disable_preempt_count > 0 );
     429        suspend();
     430        verify( disable_preempt_count > 0 );
     431
     432        enable_interrupts( DEBUG_CTX );
     433}
     434
     435void LeaveThread(spinlock * lock, thread_desc * thrd) {
     436        verify( disable_preempt_count > 0 );
     437        this_processor->finish.action_code = thrd ? Release_Schedule : Release;
     438        this_processor->finish.lock = lock;
     439        this_processor->finish.thrd = thrd;
     440
    385441        suspend();
    386442}
     
    392448// Kernel boot procedures
    393449void kernel_startup(void) {
    394         LIB_DEBUG_PRINT_SAFE("Kernel : Starting\n");   
     450        LIB_DEBUG_PRINT_SAFE("Kernel : Starting\n");
    395451
    396452        // Start by initializing the main thread
    397         // SKULLDUGGERY: the mainThread steals the process main thread 
     453        // SKULLDUGGERY: the mainThread steals the process main thread
    398454        // which will then be scheduled by the systemProcessor normally
    399         mainThread = (thread_desc *)&mainThread_storage;
     455        mainThread = (thread_desc *)&mainThreadStorage;
    400456        current_stack_info_t info;
    401457        mainThread{ &info };
     
    403459        LIB_DEBUG_PRINT_SAFE("Kernel : Main thread ready\n");
    404460
     461        // Initialize the system cluster
     462        systemCluster = (cluster *)&systemClusterStorage;
     463        systemCluster{};
     464
     465        LIB_DEBUG_PRINT_SAFE("Kernel : System cluster ready\n");
     466
     467        // Initialize the system processor and the system processor ctx
     468        // (the coroutine that contains the processing control flow)
     469        systemProcessor = (system_proc_t *)&systemProcessorStorage;
     470        systemProcessor{ systemCluster, (processorCtx_t *)&systemProcessorCtxStorage };
     471
     472        // Add the main thread to the ready queue
     473        // once resume is called on systemProcessor->runner the mainThread needs to be scheduled like any normal thread
     474        ScheduleThread(mainThread);
     475
     476        //initialize the global state variables
     477        this_processor = &systemProcessor->proc;
     478        this_thread = mainThread;
     479        this_coroutine = &mainThread->cor;
     480        disable_preempt_count = 1;
     481
    405482        // Enable preemption
    406483        kernel_start_preemption();
    407484
    408         // Initialize the system cluster
    409         systemCluster = (cluster *)&systemCluster_storage;
    410         systemCluster{};
    411 
    412         LIB_DEBUG_PRINT_SAFE("Kernel : System cluster ready\n");
    413 
    414         // Initialize the system processor and the system processor ctx
    415         // (the coroutine that contains the processing control flow)
    416         systemProcessor = (system_proc_t *)&systemProcessor_storage;
    417         systemProcessor{ systemCluster, (processorCtx_t *)&systemProcessorCtx_storage };
    418 
    419         // Add the main thread to the ready queue
    420         // once resume is called on systemProcessor->runner the mainThread needs to be scheduled like any normal thread
    421         ScheduleThread(mainThread);
    422 
    423         //initialize the global state variables
    424         this_processor = &systemProcessor->proc;
    425         this_processor->current_thread = mainThread;
    426         this_processor->current_coroutine = &mainThread->cor;
    427 
    428485        // SKULLDUGGERY: Force a context switch to the system processor to set the main thread's context to the current UNIX
    429486        // context. Hence, the main thread does not begin through CtxInvokeThread, like all other threads. The trick here is that
    430         // mainThread is on the ready queue when this call is made. 
     487        // mainThread is on the ready queue when this call is made.
    431488        resume( systemProcessor->proc.runner );
    432489
     
    435492        // THE SYSTEM IS NOW COMPLETELY RUNNING
    436493        LIB_DEBUG_PRINT_SAFE("Kernel : Started\n--------------------------------------------------\n\n");
     494
     495        enable_interrupts( DEBUG_CTX );
    437496}
    438497
    439498void kernel_shutdown(void) {
    440499        LIB_DEBUG_PRINT_SAFE("\n--------------------------------------------------\nKernel : Shutting down\n");
     500
     501        disable_interrupts();
    441502
    442503        // SKULLDUGGERY: Notify the systemProcessor it needs to terminates.
     
    448509        // THE SYSTEM IS NOW COMPLETELY STOPPED
    449510
     511        // Disable preemption
     512        kernel_stop_preemption();
     513
    450514        // Destroy the system processor and its context in reverse order of construction
    451515        // These were manually constructed so we need manually destroy them
     
    457521        ^(mainThread){};
    458522
    459         LIB_DEBUG_PRINT_SAFE("Kernel : Shutdown complete\n");   
     523        LIB_DEBUG_PRINT_SAFE("Kernel : Shutdown complete\n");
    460524}
    461525
     
    467531        // abort cannot be recursively entered by the same or different processors because all signal handlers return when
    468532        // the globalAbort flag is true.
    469         lock( &kernel_abort_lock );
     533        lock( &kernel_abort_lock DEBUG_CTX2 );
    470534
    471535        // first task to abort ?
     
    473537                kernel_abort_called = true;
    474538                unlock( &kernel_abort_lock );
    475         } 
     539        }
    476540        else {
    477541                unlock( &kernel_abort_lock );
    478                
     542
    479543                sigset_t mask;
    480544                sigemptyset( &mask );
     
    482546                sigaddset( &mask, SIGUSR1 );                    // block SIGUSR1 signals
    483547                sigsuspend( &mask );                            // block the processor to prevent further damage during abort
    484                 _exit( EXIT_FAILURE );                          // if processor unblocks before it is killed, terminate it             
    485         }
    486 
    487         return this_thread();
     548                _exit( EXIT_FAILURE );                          // if processor unblocks before it is killed, terminate it
     549        }
     550
     551        return this_thread;
    488552}
    489553
     
    494558        __lib_debug_write( STDERR_FILENO, abort_text, len );
    495559
    496         if ( thrd != this_coroutine() ) {
    497                 len = snprintf( abort_text, abort_text_size, " in coroutine %.256s (%p).\n", this_coroutine()->name, this_coroutine() );
     560        if ( thrd != this_coroutine ) {
     561                len = snprintf( abort_text, abort_text_size, " in coroutine %.256s (%p).\n", this_coroutine->name, this_coroutine );
    498562                __lib_debug_write( STDERR_FILENO, abort_text, len );
    499         } 
     563        }
    500564        else {
    501565                __lib_debug_write( STDERR_FILENO, ".\n", 2 );
     
    505569extern "C" {
    506570        void __lib_debug_acquire() {
    507                 lock(&kernel_debug_lock);
     571                lock( &kernel_debug_lock DEBUG_CTX2 );
    508572        }
    509573
    510574        void __lib_debug_release() {
    511                 unlock(&kernel_debug_lock);
     575                unlock( &kernel_debug_lock );
    512576        }
    513577}
     
    525589}
    526590
    527 bool try_lock( spinlock * this ) {
     591bool try_lock( spinlock * this DEBUG_CTX_PARAM2 ) {
    528592        return this->lock == 0 && __sync_lock_test_and_set_4( &this->lock, 1 ) == 0;
    529593}
    530594
    531 void lock( spinlock * this ) {
     595void lock( spinlock * this DEBUG_CTX_PARAM2 ) {
    532596        for ( unsigned int i = 1;; i += 1 ) {
    533                 if ( this->lock == 0 && __sync_lock_test_and_set_4( &this->lock, 1 ) == 0 ) break;
    534         }
    535 }
     597                if ( this->lock == 0 && __sync_lock_test_and_set_4( &this->lock, 1 ) == 0 ) { break; }
     598        }
     599        LIB_DEBUG_DO(
     600                this->prev_name = caller;
     601                this->prev_thrd = this_thread;
     602        )
     603}
     604
     605void lock_yield( spinlock * this DEBUG_CTX_PARAM2 ) {
     606        for ( unsigned int i = 1;; i += 1 ) {
     607                if ( this->lock == 0 && __sync_lock_test_and_set_4( &this->lock, 1 ) == 0 ) { break; }
     608                yield();
     609        }
     610        LIB_DEBUG_DO(
     611                this->prev_name = caller;
     612                this->prev_thrd = this_thread;
     613        )
     614}
     615
    536616
    537617void unlock( spinlock * this ) {
     
    539619}
    540620
    541 void ?{}( signal_once * this ) {
    542         this->cond = false;
    543 }
    544 void ^?{}( signal_once * this ) {
    545 
    546 }
    547 
    548 void wait( signal_once * this ) {
    549         lock( &this->lock );
    550         if( !this->cond ) {
    551                 append( &this->blocked, this_thread() );
    552                 ScheduleInternal( &this->lock );
    553                 lock( &this->lock );
    554         }
     621void  ?{}( semaphore * this, int count = 1 ) {
     622        (&this->lock){};
     623        this->count = count;
     624        (&this->waiting){};
     625}
     626void ^?{}(semaphore * this) {}
     627
     628void P(semaphore * this) {
     629        lock( &this->lock DEBUG_CTX2 );
     630        this->count -= 1;
     631        if ( this->count < 0 ) {
     632                // queue current task
     633                append( &this->waiting, (thread_desc *)this_thread );
     634
     635                // atomically release spin lock and block
     636                BlockInternal( &this->lock );
     637        }
     638        else {
     639            unlock( &this->lock );
     640        }
     641}
     642
     643void V(semaphore * this) {
     644        thread_desc * thrd = NULL;
     645        lock( &this->lock DEBUG_CTX2 );
     646        this->count += 1;
     647        if ( this->count <= 0 ) {
     648                // remove task at head of waiting list
     649                thrd = pop_head( &this->waiting );
     650        }
     651
    555652        unlock( &this->lock );
    556 }
    557 
    558 void signal( signal_once * this ) {
    559         lock( &this->lock );
    560         {
    561                 this->cond = true;
    562 
    563                 thread_desc * it;
    564                 while( it = pop_head( &this->blocked) ) {
    565                         ScheduleThread( it );
    566                 }
    567         }
    568         unlock( &this->lock );
     653
     654        // make new owner
     655        WakeThread( thrd );
    569656}
    570657
     
    590677                }
    591678                head->next = NULL;
    592         }       
     679        }
    593680        return head;
    594681}
     
    609696                this->top = top->next;
    610697                top->next = NULL;
    611         }       
     698        }
    612699        return top;
    613700}
Note: See TracChangeset for help on using the changeset viewer.