Changes between Version 2 and Version 3 of 802.11/wlan_exp/app_notes/tutorial_token_mac/extensions


Ignore:
Timestamp:
Jul 13, 2015, 2:55:11 PM (9 years ago)
Author:
chunter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 802.11/wlan_exp/app_notes/tutorial_token_mac/extensions

    v2 v3  
    55= Extending TokenMAC =
    66
    7 = Characterizing Extended TokenMAC =
     7Recall in the [wiki:802.11/wlan_exp/app_notes/tutorial_token_mac/characterization characterization section of this tutorial] that we noted a significant weakness in the design of TokenMAC -- when there is no contention between multiple flows, the token reservation periods for idle nodes are wasted. The design really only starts to show any gains when devices are backlogged and have a lot of traffic to send. This isn't a realistic assumption for typical traffic profiles.
     8
     9In this section, we propose a simple extension to TokenMAC to address this problem. By default, a TokenMAC AP issues a reservation to each device on the network in a round-robing sequence for a fixed {{{DEFAULT_RESERVATION_DURATION_USEC}}} microseconds. Our extension will make this parameter adaptive. Rather than be fixed value, an AP will give longer reservation periods to devices that are actively using the time allocated to them. Conversely, idle or near-idle devices will be given a smaller duration of the medium until they demonstrate a need for more. We can implement this behavior entirely in CPU_HIGH and leave the low-level frame exchange behavior alone. Specifically, will augment the AP so that it audits how well each reservation period is utilized. If this audit deems that the device used a sufficient amount of the allocation given to it, a multiplication factor will increase the duration of the allocation the device's next turn.
     10
     11== Specific Changes ==
     12
     13=== MAC High Framework ===
     14
     15Changes should be made to [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_high_framework/wlan_mac_high.c wlan_mac_high.c] and [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_high_framework/include/wlan_mac_high.h wlan_mac_high.h].
     16
     17----
     18CPU_LOW is already configured to send the {{{IPC_MBOX_TOKEN_NEW_RESERVATION}}} IPC message back up to CPU_HIGH as a confirmation when a new reservation period starts. It will also send the {{{IPC_MBOX_TOKEN_END_RESERVATION}}} IPC message up to CPU_HIGH when the reservation period is over (which is how CPU_HIGH currently knows when to rotate to the next device for its reservation period). These messages demarcate the intervals that the AP should audit performance. The first change we will make to the MAC High Framework is to add two new callbacks that will be called upon the reception of these IPC messages. Add the following top-level global function pointers to the MAC High Framework:
     19
     20{{{
     21#!c
     22
     23volatile function_ptr_t      token_stats_start_callback;
     24volatile function_ptr_t      token_stats_end_callback;
     25}}}
     26
     27In {{{wlan_mac_high_init()}}}, make sure to set these callbacks to the default nullCallback with the following two lines of code:
     28
     29{{{
     30#!c
     31
     32        token_stats_start_callback = (function_ptr_t)nullCallback;
     33        token_stats_end_callback = (function_ptr_t)nullCallback;
     34}}}
     35
     36Finally, add the following setters for these callbacks so we can assign them in the AP code:
     37
     38{{{
     39#!c
     40
     41void wlan_mac_high_set_token_stats_start_callback(function_ptr_t callback){
     42        token_stats_start_callback = callback;
     43}
     44
     45void wlan_mac_high_set_token_stats_end_callback(function_ptr_t callback){
     46        token_stats_end_callback = callback;
     47}
     48}}}
     49
     50----
     51
     52
     53
     54== Characterizing Extended TokenMAC ==
    855
    956||  [[Image(wiki:802.11/wlan_exp/app_notes/tutorial_token_mac/figs:token_xput.png, width=600)]]  ||  [[Image(wiki:802.11/wlan_exp/app_notes/tutorial_token_mac/figs:token_extended_xput.png, width=600)]]  ||
     
    2572||  '''Extended TokenMAC: Transition C Timeline'''  ||
    2673
    27