Adaptation/GUID-85C18DAF-DB76-51C6-B38D-A802E314F4D1.dita
changeset 15 307f4279f433
equal deleted inserted replaced
14:578be2adaf3e 15:307f4279f433
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE task
       
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
       
    12 <task id="GUID-85C18DAF-DB76-51C6-B38D-A802E314F4D1" xml:lang="en"><title>Performance
       
    13 Guarantee Tutorial </title><shortdesc>Describes how to maintain performance guarantees when writing a
       
    14 software package on a data paged platform. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    15 <context id="GUID-067EBD71-74FF-5C3C-BBFE-792895383980"><p>Data paging can
       
    16 affect performance guarantees. When writing software for a data paged platform,
       
    17 you need to perform an impact assessment on the components of your application.
       
    18 To do so, you perform the following analyses and implement the appropriate
       
    19 mitigation for the impacts you discover: </p> <ul>
       
    20 <li id="GUID-902266C8-BC97-5C0A-9C61-13F252CE3DC8"><p>Static analysis, </p> </li>
       
    21 <li id="GUID-70E2A254-1799-5A1E-A440-6E7F30EC3337"><p>Use case analysis, and </p> </li>
       
    22 <li id="GUID-B5A5134E-CD51-59BA-9F05-0DFA2E200660"><p>IPC analysis. </p> </li>
       
    23 </ul> </context>
       
    24 <steps-unordered id="GUID-5AECEB9A-F5AC-5D72-A216-F31C8E024453">
       
    25 <step id="GUID-B5C885F6-8703-5E43-8979-72A2D11007AB"><cmd>Perform a static
       
    26 analysis of the impact of data paging on your code. </cmd>
       
    27 <substeps id="GUID-31FA74DF-5D4D-5DE5-96D4-A1978187E40D">
       
    28 <substep id="GUID-C9722F09-D534-5CC3-AC25-238C0C101DC7"><cmd/>
       
    29 <info>List all the executables in your package, indicating their size and
       
    30 pageability. </info>
       
    31 </substep>
       
    32 <substep id="GUID-6193E0A0-AFB1-5641-973F-0D27F721983F"><cmd/>
       
    33 <info>For each item in the list identify its static dependencies, indicating
       
    34 their size and pageability. </info>
       
    35 </substep>
       
    36 <substep id="GUID-509636D1-3B7C-546D-8EC4-A7AE515B904E"><cmd/>
       
    37 <stepxmp>For each item in the list identify its dynamic dependencies, indicating
       
    38 their size and pageability. </stepxmp>
       
    39 <info>For instance, note whether the component is a plug-in to a framework
       
    40 or is itself a framework. </info>
       
    41 </substep>
       
    42 </substeps>
       
    43 <stepresult>The purpose of collecting this information is to identify which
       
    44 executables are most likely to be impacted by data paging. </stepresult>
       
    45 </step>
       
    46 <step id="GUID-469BB5C7-9BC7-5E3B-9717-B5558D2F6859"><cmd>Perform a use case
       
    47 analysis of the impact of data paging on your code. It is good practice to
       
    48 distinguish between use cases involving real time and performance critical
       
    49 performance guarantees. You do not need to cover use cases which do not involve
       
    50 guarantees of this kind. </cmd>
       
    51 <substeps id="GUID-CC4B31C6-85B3-53FA-AEB1-4713B0F7E51C">
       
    52 <substep id="GUID-4251C5AC-9F23-5850-A9C3-E086B00E45D9"><cmd>List all the
       
    53 use cases for the component which involve real time performance guarantees. </cmd>
       
    54 <info>Real time use cases are those having very strict response time guarantees
       
    55 and also those involving an acceptable user perception of behaviour. </info>
       
    56 <info><ul>
       
    57 <li id="GUID-F24C5888-773A-5F17-911F-1424D5381616"><p>Video playback, </p> </li>
       
    58 <li id="GUID-2C9B272C-265A-5A82-B9A0-A0CB5D2CC165"><p>VoIP phone calls, and </p> </li>
       
    59 <li id="GUID-20D52A34-F21E-565E-9698-8E0A169B7E3F"><p>File download over USB. </p> </li>
       
    60 </ul> </info>
       
    61 <stepresult>Examples of use cases involving acceptable user perception are: </stepresult>
       
    62 </substep>
       
    63 <substep id="GUID-702A77F3-ACE4-5047-825E-267747AF4E70"><cmd>List all the
       
    64 use cases for the component which involve performance critical guarantees.
       
    65 This means the bench-marked use cases by which the performance of the operating
       
    66 system is measure. </cmd>
       
    67 <stepxmp>Examples of use cases having a strict response time are: </stepxmp>
       
    68 <info><ul>
       
    69 <li id="GUID-C2CAE80F-F20F-5464-9A5D-77858D26572C"><p>Standard boot time, </p> </li>
       
    70 <li id="GUID-379EF955-B1D2-5A4F-A9CA-295BCDA6D84C"><p>Application start-up
       
    71 time, and </p> </li>
       
    72 <li id="GUID-5111E2E5-9411-5BD6-BC60-B1E64A3DBE57"><p>Camera image capture
       
    73 time. </p> </li>
       
    74 </ul> </info>
       
    75 </substep>
       
    76 <substep id="GUID-C6089DA1-C2A8-5D57-8F1C-B5D94D01CD31"><cmd>Identify compound
       
    77 cases involving both real time and performance critical guarantees. </cmd>
       
    78 <info>An example of a compound case is receiving a text message while playing
       
    79 MP3 audio. </info>
       
    80 </substep>
       
    81 </substeps>
       
    82 </step>
       
    83 <step id="GUID-13DE4D82-D318-5C1B-A9A0-9C8D60C7A6B7"><cmd>Perform an IPC analysis
       
    84 of the impact of data paging on your code. </cmd>
       
    85 <substeps id="GUID-C53DD02E-D670-5608-9293-663495544410">
       
    86 <substep id="GUID-14395B5D-B0C1-5380-B6D4-A9A5D5FA5A16"><cmd>Identify all
       
    87 performance critical or real time servers which the component interacts with. </cmd>
       
    88 </substep>
       
    89 <substep id="GUID-B4429AD3-5B5F-5E10-A220-724BA9693D29"><cmd>List each case
       
    90 where these servers read paged data from a client's address space. In this
       
    91 case, paged data includes: </cmd>
       
    92 <info><ul>
       
    93 <li id="GUID-02F9AD09-BFEB-59D3-98C6-471A2D842F32"><p>Paged heaps and stacks, </p> </li>
       
    94 <li id="GUID-BEA351B7-27C8-54F4-A2A9-F0314153D1F8"><p>RAM-loaded code, and </p> </li>
       
    95 <li id="GUID-AE1A2E25-C84A-5CCB-AC03-40017B1E5EEF"><p>Read only XIP data structures
       
    96 including </p> <ul>
       
    97 <li id="GUID-A61629A2-6782-52E6-A64B-41825F454B1B"><p>bitmaps, </p> </li>
       
    98 <li id="GUID-B5657762-F2E1-5521-AB33-E95547BA154B"><p>constant descriptors, </p> </li>
       
    99 <li id="GUID-0A667519-6532-52C4-BCCD-022A44F701D6"><p>constant data arrays
       
   100 in code, </p> </li>
       
   101 <li id="GUID-E8C94651-CAA0-5EFE-8E87-6B7A7B7A8785"><p>data files accessed
       
   102 through a pointer, and </p> </li>
       
   103 <li id="GUID-CD319825-B44F-5EF3-A9CC-2B3391F2D9A8"><p>exported DLL data. </p> </li>
       
   104 </ul> </li>
       
   105 </ul> </info>
       
   106 </substep>
       
   107 <substep id="GUID-CB118001-AC5E-5C39-81C1-EB9DEFA2F16E"><cmd>Identify all
       
   108 cases of custom architectures where one thread reads from another thread's
       
   109 address space. </cmd>
       
   110 </substep>
       
   111 </substeps>
       
   112 </step>
       
   113 <step id="GUID-009892B8-88B2-5ACA-BB98-B88ECF49A983"><cmd>Take steps to mitigate
       
   114 the impacts of data paging which you have identified, as appropriate to each
       
   115 case. </cmd>
       
   116 
       
   117 <substeps id="GUID-63086536-F2DB-5F4A-926F-C0328FD8D854">
       
   118 <substep id="GUID-F2821854-2A7D-5FB4-8D75-63841CDD26F7"><cmd>Protect the real
       
   119 time and performance critical code paths. These paths will have been identified
       
   120 in the static analysis of the component. There are two ways of protecting
       
   121 them. </cmd>
       
   122 <info><ul>
       
   123 <li id="GUID-5CA87396-D31D-5AC2-B524-0405129AEC23"><p>For all use cases, ensure
       
   124 that the minimum paging cache size is large enough to accommodate both the
       
   125 protected code path and any other paged data required at the same time. </p> <p>This
       
   126 method of protection may not always be practical, because compound use cases
       
   127 may involve unpredictable amounts of data which exceed the size of the paging
       
   128 cache. </p> </li>
       
   129 <li id="GUID-A702633C-A6DB-5DB2-9FA0-20F8FF4A285E"><p>Make the protected code
       
   130 path unpaged. Mark the code itself as unpaged, and either mark whole regions
       
   131 of memory as unpaged or pin memory to ensure that it is unpaged. </p> </li>
       
   132 </ul> </info>
       
   133 </substep>
       
   134 <substep id="GUID-9486786D-191D-597F-9BCE-09CB3A74A165"><cmd>Redesign the
       
   135 component architecture to isolate areas where data paging impacts on performance.
       
   136 Examples of this are: </cmd>
       
   137 <info><ul>
       
   138 <li id="GUID-76E2623B-9B76-5424-9C40-3BC027C449A2"><p>Separating the data
       
   139 plane and the control plane, and </p> </li>
       
   140 <li id="GUID-26906CC5-1D1B-5EED-A9F8-CBBE6F441369"><p>Splitting a monolithic
       
   141 library into paged and unpaged parts. </p> </li>
       
   142 </ul> </info>
       
   143 </substep>
       
   144 <substep id="GUID-438E7745-76B3-533D-891E-93B8EA53F342"><cmd>Use code paging
       
   145 or XIP ROM paging to mitigate the impact of paging. </cmd>
       
   146 
       
   147 <info>For instance, a monolithic library with static dependences may only
       
   148 need to be partially loaded, and some dependencies may not need to be loaded
       
   149 at all. </info>
       
   150 </substep>
       
   151 <substep id="GUID-DD1D6948-8F9A-57D6-9156-C9C2E377D2FD"><cmd/>
       
   152 <info>Mitigate the impact of data paging on IPC using the techniques set out
       
   153 in the document <xref href="GUID-E7C55048-5B7A-5BF2-B7F4-4D731659B88C.dita">Device
       
   154 Driver Writing Technology Tutorial</xref>  </info>
       
   155 </substep>
       
   156 </substeps>
       
   157 </step>
       
   158 </steps-unordered>
       
   159 </taskbody></task>