Changes between Version 2 and Version 3 of wti_box_attribution
- Timestamp:
- Aug 1, 2016, 3:54:37 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
wti_box_attribution
v2 v3 10 10 [[Image(WTI.svg, 50%)]] 11 11 12 We call those interruptions the **Write Triggered Interruptions (WTI)** because they are triggered by a write operation in the Xicu's mailboxes register .12 We call those interruptions the **Write Triggered Interruptions (WTI)** because they are triggered by a write operation in the Xicu's mailboxes registers. 13 13 14 14 == Mailboxes' attribution == 15 Each cluster possess an XICU which has 16 mailboxes, 4 of them are reserved for the inter process interrupt ions (IPI). The fifth mailbox of the cluster 0's Xicu is also reserved, it is the `DEV_NULL` mailbox, its use will be explained later.15 Each cluster possess an XICU which has 16 mailboxes, 4 of them are reserved for the inter process interrupts (IPI). The fifth mailbox of the cluster 0's Xicu is also reserved, it is the `DEV_NULL` mailbox, its use will be explained later. 16 16 17 17 External peripherals can use 12 of this mailboxes to signal their I/O operation's end and that the ISR associated to the peripheral has to be executed. … … 49 49 When the disk will end its I/O operation, it will ordoer the IOPIC to write in the fifth mailbox so the core P1 will execute the disk's ISR. 50 50 51 == mailboxattribution API ==52 Pour mettre en place ce mécanisme nous avons dû écrire une API, celle-ci est composée d'une structure et de trois fonctions.51 == Mailboxes' attribution API == 52 To set up this mecanism we wrote an PI, it is composed of a structure and 3 functions. 53 53 54 Les deux fonctions de base de l'API sont donc `get_configure_mailbox` et `put_mailbox`. En effet, celles-ci pourront être utilisées dans l'écriture de futur driver.54 The two main functions of this API are `get_configure_mailbox` and `put_mailbox`. Indeed, they can be used for future drivers' writing. 55 55 56 === La structure `mbox_manager`===57 Cette structure est présente dans chaque cluster, elle contient deux champs :58 * un spinlock pour prévenir les accès concurents59 * un tableau d'état des boîtes aux lettres56 === The `mbox_manager` structure === 57 This structure can be found in each cluster, it has two fields : 58 * a spinlock for mutual exclusion 59 * an array of mailboxes' state 60 60 61 Chaque case du tableau représente l'état d'une boîte aux lettres, ces différents états sont : 62 * IPI : La boîte aux lettres est utilisée pour une IPI, elle ne sera donc pas utilisée pour une WTI. Les ''n'' premières boîtes aux lettres sont réservées à cet usage (où ''n'' est le nombre de cœur du cluster). 63 * FREE : La boîte est libre et peut-être utilisée pour une WTI. 64 * L'identifiant local du cœur propriétaire. 61 Each entry 62 Chaque case du tableau represents the mailbox's state, those different states are : 63 * IPI : The box is used for IPI, it can not be used for WTI. The ''n'' first mailboxes are reserved for IPI (''n'' is the cluster's number of core). 64 * FREE : The box is free an can be used for WTI. 65 * The id of proprietary core. 65 66 66 67 === `void mbox_m_init(struct mbox_manager *mbox_m)` === 67 Cette fonction est appelée lors de l'initialisation du cluster, elle marque les premières boîtes aux lettres comme étant réservées aux IPI tandis que les autres seront marquées comme étant libres.68 This function is called during the cluster's initialization, it marks the first mailboxes as reserved for IPI whereas the others are marked as free. 68 69 69 70 === `void get_configure_mailbox(struct mbox_manager *mbox_m, struct device_s *dev)` === 70 Cette fonction alloue une boîte aux lettres du mbox_manager `mbox_m` au device `dev` reconfigure le masque de l'Xicu et associe l'ISR de `dev` à la boîte au lettre allouée.71 Cette fonction est bloquante tant qu'aucune boîte aux lettres n'a été trouvée.71 This function allocate a mailbox of the mbox_manager `mbox_m` to the device `dev`, then it configures the Xicu's mask and link the `dev`'s ISR to the allocated mailbox. 72 This functions blocks while no boxe was found. 72 73 73 74 === `int put_mailbox(uint_t wti_index, struct mbox_manager *mbox_m)` === 74 Cette fonction rend la boîte aux lettres d'index `wti_index` appartenant au mbox_manager `mbox_m`, elle masque aussi l'interruption et dés-associe l'ISR et la boîte aux lettres.75 Cette fonction renvoie 0 en cas de succès ou un code d'erreur dans le cas contraire.75 This function releases the mailbox which index is `wti_index` in the mbox_manager `mbox_m`, it also masks the interrupt and unlink the ISR to the mailbox. 76 This function returns 0 when success or an error number otherwise. 76 77 77 == A vantages et inconvénients de cette API==78 L'utilisation de cette API permet une certaine souplesse. En effet, grâce à cette API il serait possible d'utiliser tous les périphériques si on disposait d'une XICU possédant une unique boîte aux lettres (bien entendu les processeurs devraient se la partager et il y aurait alors de la séquentialité).78 == API's advantages and disadvantages == 79 The use of this API permits a certain flexibility. Indeed, thanks to this API it will be possible to use all the peripheral even if we have an Xicu with only one mailbox (of course the different cores will have to shared the mailbox so il will have sequentiality). 79 80 80 Grâce à la politique pollueur/payeur les caches des cœurs ne sont pas gâchés par l'ISR d'un cœur voisin.81 Thanks to "polluter-payer" politic the cores' caches are not spoiled by the ISR of a neighbour core. 81 82 82 Toutefois l'utilisation de cette API rallonge les opérations d'entrée/sortie. **En effet, il semblerait que l'exécution d'un simple programme "`open; read; close;`" prenne 40 000 cycles supplémentaires par rapport à une opération d'entrée/sortie sans utilisation de l'API.**83 However, the use of this API makes the I/O operation longer. **Indeed, it seems that the execution of a simple program "`open; read; close;`" takes 40 000 cycles more compared to an I/O operation without the use of the API.** 83 84 84 85