{"push_id":2633701473,"size":7,"distinct_size":7,"ref":"refs/heads/master","head":"75d21821c522511e3e451984498a6b5643c7cee2","before":"3f5a2b4a2c3158a4cb63403d3aeaf6b4d948d674","commits":[{"sha":"2dc709f56be7756258b2890a0571038e92808eab","author":{"name":"Paolo Valente","email":"77843028b8f8419c9977951e271784ccf7804be9@unimore.it"},"message":"block: introduce the BFQ-v7r8 I/O sched for 3.18.0\n\nAdd the BFQ-v7r8 I/O scheduler to 3.18.0.\nThe general structure is borrowed from CFQ, as much of the code for\nhandling I/O contexts. Over time, several useful features have been\nported from CFQ as well (details in the changelog in README.BFQ). A\n(bfq_)queue is associated to each task doing I/O on a device, and each\ntime a scheduling decision has to be made a queue is selected and served\nuntil it expires.\n\n    - Slices are given in the service domain: tasks are assigned\n      budgets, measured in number of sectors. Once got the disk, a task\n      must however consume its assigned budget within a configurable\n      maximum time (by default, the maximum possible value of the\n      budgets is automatically computed to comply with this timeout).\n      This allows the desired latency vs \"throughput boosting\" tradeoff\n      to be set.\n\n    - Budgets are scheduled according to a variant of WF2Q+, implemented\n      using an augmented rb-tree to take eligibility into account while\n      preserving an O(log N) overall complexity.\n\n    - A low-latency tunable is provided; if enabled, both interactive\n      and soft real-time applications are guaranteed a very low latency.\n\n    - Latency guarantees are preserved also in the presence of NCQ.\n\n    - Also with flash-based devices, a high throughput is achieved\n      while still preserving latency guarantees.\n\n    - BFQ features Early Queue Merge (EQM), a sort of fusion of the\n      cooperating-queue-merging and the preemption mechanisms present\n      in CFQ. EQM is in fact a unified mechanism that tries to get a\n      sequential read pattern, and hence a high throughput, with any\n      set of processes performing interleaved I/O over a contiguous\n      sequence of sectors.\n\n    - BFQ supports full hierarchical scheduling, exporting a cgroups\n      interface.  Since each node has a full scheduler, each group can\n      be assigned its own weight.\n\n    - If the cgroups interface is not used, only I/O priorities can be\n      assigned to processes, with ioprio values mapped to weights\n      with the relation weight = IOPRIO_BE_NR - ioprio.\n\n    - ioprio classes are served in strict priority order, i.e., lower\n      priority queues are not served as long as there are higher\n      priority queues.  Among queues in the same class the bandwidth is\n      distributed in proportion to the weight of each queue. A very\n      thin extra bandwidth is however guaranteed to the Idle class, to\n      prevent it from starving.\n\nSigned-off-by: Paolo Valente <paolo.valente@unimore.it>\nSigned-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>","distinct":true,"url":"https://api.github.com/repos/mawrick26/S7E-O5/commits/2dc709f56be7756258b2890a0571038e92808eab"},{"sha":"4337d756e497a8426d3821843cd8f9c52366fd0d","author":{"name":"Mauro Andreolini","email":"ddd3503978591997e768ebc37fca6c687c31d545@unimore.it"},"message":"block, bfq: add Early Queue Merge (EQM) to BFQ-v7r8 for 3.18.0\n\nA set of processes may happen  to  perform interleaved reads, i.e.,requests\nwhose union would give rise to a  sequential read  pattern.  There are two\ntypical  cases: in the first  case,   processes  read  fixed-size chunks of\ndata at a fixed distance from each other, while in the second case processes\nmay read variable-size chunks at  variable distances. The latter case occurs\nfor  example with  QEMU, which  splits the  I/O generated  by the  guest into\nmultiple chunks,  and lets these chunks  be served by a  pool of cooperating\nprocesses,  iteratively  assigning  the  next  chunk of  I/O  to  the first\navailable  process. CFQ  uses actual  queue merging  for the  first type of\nrocesses, whereas it  uses preemption to get a sequential  read pattern out\nof the read requests  performed by the second type of  processes. In the end\nit uses  two different  mechanisms to  achieve the  same goal: boosting the\nthroughput with interleaved I/O.\n\nThis patch introduces  Early Queue Merge (EQM), a unified mechanism to get a\nsequential  read pattern  with both  types of  processes. The  main idea is\nchecking newly arrived requests against the next request of the active queue\nboth in case of actual request insert and in case of request merge. By doing\nso, both the types of processes can be handled by just merging their queues.\nEQM is  then simpler and  more compact than the  pair of mechanisms used in\nCFQ.\n\nFinally, EQM  also preserves the  typical low-latency properties of BFQ, by\nproperly restoring the weight-raising state of a queue when it gets back to\na non-merged state.\n\nSigned-off-by: Mauro Andreolini <mauro.andreolini@unimore.it>\nSigned-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>\nSigned-off-by: Paolo Valente <paolo.valente@unimore.it>","distinct":true,"url":"https://api.github.com/repos/mawrick26/S7E-O5/commits/4337d756e497a8426d3821843cd8f9c52366fd0d"},{"sha":"67330b87a346e8ae00f5a602a165c83d8d4d159f","author":{"name":"mawrick26","email":"501cd683bb822fe81527082022f455248c8d233d@gmail.com"},"message":"block: enable bfq in makefile & kconfig\n\nSigned-off-by: mawrick26 <mawrick26@gmail.com>","distinct":true,"url":"https://api.github.com/repos/mawrick26/S7E-O5/commits/67330b87a346e8ae00f5a602a165c83d8d4d159f"},{"sha":"6355ad386be3a4b254ae3db78dcd1938509fcad2","author":{"name":"Paolo Valente","email":"77843028b8f8419c9977951e271784ccf7804be9@linaro.org"},"message":"block/bfq: Port BFQ-v8r10 to Android 3.18 kernel\n\nblock: cgroups, kconfig, build bits for BFQ-v7r11-4.4.0\n\nUpdate Kconfig.iosched and do the related Makefile changes to include\nkernel configuration options for BFQ. Also increase the number of\npolicies supported by the blkio controller so that BFQ can add its\nown.\n\nSigned-off-by: Paolo Valente <paolo.valente@unimore.it>\nSigned-off-by: Arianna Avanzini <avanzini@google.com>\n\nblock: introduce the BFQ-v7r11 I/O sched for 4.4.0\n\nThe general structure is borrowed from CFQ, as much of the code for\nhandling I/O contexts. Over time, several useful features have been\nported from CFQ as well (details in the changelog in README.BFQ). A\n(bfq_)queue is associated to each task doing I/O on a device, and each\ntime a scheduling decision has to be made a queue is selected and served\nuntil it expires.\n\n    - Slices are given in the service domain: tasks are assigned\n      budgets, measured in number of sectors. Once got the disk, a task\n      must however consume its assigned budget within a configurable\n      maximum time (by default, the maximum possible value of the\n      budgets is automatically computed to comply with this timeout).\n      This allows the desired latency vs \"throughput boosting\" tradeoff\n      to be set.\n\n    - Budgets are scheduled according to a variant of WF2Q+, implemented\n      using an augmented rb-tree to take eligibility into account while\n      preserving an O(log N) overall complexity.\n\n    - A low-latency tunable is provided; if enabled, both interactive\n      and soft real-time applications are guaranteed a very low latency.\n\n    - Latency guarantees are preserved also in the presence of NCQ.\n\n    - Also with flash-based devices, a high throughput is achieved\n      while still preserving latency guarantees.\n\n    - BFQ features Early Queue Merge (EQM), a sort of fusion of the\n      cooperating-queue-merging and the preemption mechanisms present\n      in CFQ. EQM is in fact a unified mechanism that tries to get a\n      sequential read pattern, and hence a high throughput, with any\n      set of processes performing interleaved I/O over a contiguous\n      sequence of sectors.\n\n    - BFQ supports full hierarchical scheduling, exporting a cgroups\n      interface.  Since each node has a full scheduler, each group can\n      be assigned its own weight.\n\n    - If the cgroups interface is not used, only I/O priorities can be\n      assigned to processes, with ioprio values mapped to weights\n      with the relation weight = IOPRIO_BE_NR - ioprio.\n\n    - ioprio classes are served in strict priority order, i.e., lower\n      priority queues are not served as long as there are higher\n      priority queues.  Among queues in the same class the bandwidth is\n      distributed in proportion to the weight of each queue. A very\n      thin extra bandwidth is however guaranteed to the Idle class, to\n      prevent it from starving.\n\nSigned-off-by: Paolo Valente <paolo.valente@unimore.it>\nSigned-off-by: Arianna Avanzini <avanzini@google.com>\n\nblock, bfq: add Early Queue Merge (EQM) to BFQ-v7r11 for 4.4.0\n\nA set of processes may happen  to  perform interleaved reads, i.e.,requests\nwhose union would give rise to a  sequential read  pattern.  There are two\ntypical  cases: in the first  case,   processes  read  fixed-size chunks of\ndata at a fixed distance from each other, while in the second case processes\nmay read variable-size chunks at  variable distances. The latter case occurs\nfor  example with  QEMU, which  splits the  I/O generated  by the  guest into\nmultiple chunks,  and lets these chunks  be served by a  pool of cooperating\nprocesses,  iteratively  assigning  the  next  chunk of  I/O  to  the first\navailable  process. CFQ  uses actual  queue merging  for the  first type of\nrocesses, whereas it  uses preemption to get a sequential  read pattern out\nof the read requests  performed by the second type of  processes. In the end\nit uses  two different  mechanisms to  achieve the  same goal: boosting the\nthroughput with interleaved I/O.\n\nThis patch introduces  Early Queue Merge (EQM), a unified mechanism to get a\nsequential  read pattern  with both  types of  processes. The  main idea is\nchecking newly arrived requests against the next request of the active queue\nboth in case of actual request insert and in case of request merge. By doing\nso, both the types of processes can be handled by just merging their queues.\nEQM is  then simpler and  more compact than the  pair of mechanisms used in\nCFQ.\n\nFinally, EQM  also preserves the  typical low-latency properties of BFQ, by\nproperly restoring the weight-raising state of a queue when it gets back to\na non-merged state.\n\nSigned-off-by: Mauro Andreolini <mauro.andreolini@unimore.it>\nSigned-off-by: Arianna Avanzini <avanzini@google.com>\nSigned-off-by: Paolo Valente <paolo.valente@unimore.it>\nSigned-off-by: Linus Walleij <linus.walleij@linaro.org>\n\nRemove useless includes from bfq.h\n\nReverse include order between blk.h and bfq.h\n\nAlign blk-cgroup code with CFQ, and fix related small bugs\n\nBUGFIX: expire bfqq if needed in bfq_bfqq_move\n\nIf bfqq happens to be in service but empty when bfq_bfqq_move is invoked,\nthen bfqq is also still marked as busy and bfq_del_bfqq_busy is invoked.\nThis triggers the failure of the check that bfq_del_bfqq_busy is not\ninvoked on the in-service queue. In particular, this flow of operations\nis imprecise also because it is better to expire and reschedule bfqq\nif in service, so as to make sure that it continues to be served only\nif it makes sense accordi to its new group memebrship.\n\nThis commit fixes these problems by just expring bfqq, as a preliminary\nstep, if bfqq is in service.\n\nImprove logging functions\n\nRemove apparently useless check on bfq_class_idle from dispatch_requests\n\nServe also async queues based only on budget consumption\n\nIn addition to simplifying the code, this allows a more\nprecise control on the bandwidth provided to async queues.\n\nAdd group logging and more BUG_ONs for groups\n\nTurn next-in-service check into a WARNING, and improve comments on next_in_service\n\nImprove use of async_charge_factor\n\nIntroduce preemption-based, idleless service guarantees\n\nIf several processes are competing for the device at the\nsame time, but all processes and groups have the same weight,\nthen the mechanism introduced by this commit enables BFQ to\nguarantee the expected throughput distribution without ever\nidling the device. Throughput is then much higher in this\ncommon scenario.\n\nThis commit also refactors the long function bfq_add_request,\nand improves and extends most comments.\n\nImprove handling of bursts of queue activations\n\nThis commits improves the handling of bursts of queue\nactivations in the following aspects.\n- It reduces false positives by introducing the following\n  constraints:\n\t. all queues in a burst must belong to the same group\n\t. only queue creations, and not reactivations,\n\t  contribute to a burst\n- It improves burst detection in the presence of queue merging,\n  by moving detection from bfq_add_request, which is not invoked\n  in case of an early merge, to bfq_set_request, which is always\n  invoked on the arrival of a request\n- It fixes the re-marking of the flag in_large_burst after a split\n\nImprove EQM\n\nThis commit improves EQM as follows.\n- It lets weight-raised queues preserve weight-raising\n- It reduces false positives by allowing only non-weight-raised or very\n  recently weight-raised queues to be merged\n- It checks whether a queue has just been split by using a timestamp,\n  instead of a flag whose value might remain unchanged for a long time\n  if no request arrived or was served for the queue\n\nSquash me\n\nPort CFQ commits 3dde36ddea3 and e9ce335df51ff\n\nPort part of:\n. commit 3dde36ddea3e07dd025c4c1ba4 \"rework of seeky detection\"\n\t- remove constanly-seeky flag too\n\t- do not port the part related to nonrot: it does not\n\t  seem so convincing, because it does not take\n\t  sequential accesses into account at all\n. commit e9ce335df51ff782035a15c261a3c0 \"fix a kbuild regression\"\n\t- basically introduce BFQQ_CLOSE_THR for EQM\n\nImprove peak-rate estimation and rate-based autotuning\n\nThis commit improves peak-rate estimation and autotuning of\nthe parameters related to the device rate.\n- It makes the low-pass filter for peak-rate estimation more\n  conservative\n- It improves the threshold for the switch between device-speed\n  classes\n- It introduces a simpler rule for detecting a queue as slow\n- It replaces the function bfq_bfqq_charge_full_budget with the much\n  more precise function bfq_bfqq_charge_time\n\nImprove weight-raising mechanism\n\nThis commit:\n- reduces the budget for weight-raised queues and makes it constant:\n  this reduces latencies for weight-raised queues\n- postpones the beginning of the weight-raising period of soft real-time\n  queues, to when these queues do start to be served: this helps soft\n  real-time queues preserve weight-raising despite the short duration\n  of their weight-raising period\n- makes the evauation of the idle period of a queue more precise\n- increases the weight coefficient for weight-raised queues\n\nBUGFIX: fix service-tree selection for non-leaf entities\n\nAdd extra logging\n\nBUGFIX: remove incorrect group-related BUG_ON\n\nImprove time handling to reduce wraparound issues\n\nChange default group weight\n\nAdd strict-guarantees tunable\n\nIf this tunable is set, then device-idling is forced whenever needed to\nprovide accurate service guarantees. CAVEAT: idling unconditionally may\neven increase latencies, in case of processes that did stop doing I/O.\n\nBUGFIX: fix wrong Kconfig.iosched dependency for BFQ_GROUP_IOSCHED\n\nReplace max with more efficient max_t\n\nReplace time_is_XXX_jiffies when appropriate\n\nImprove some comments\n\nFix computation of queue weight as a function of ioprio\n\nLet weight range from 80 to 10 as a function of ioprio, in steps of 10.\n\nImprove consistency with new IO controller\n\nAnnounce as v8-rc2\n\nFix conditional-compilation errors related to cgroups\n\nPort commit 4ebc1c61d6185604c97fd0b0355ab668052044ab\n\nPort commit 95e5d6f62693f27d9011ec307eb32c6126314ea3\n\nPort commit bce6133b09013f70d41a678d262a12147ed43889\n\nPort commit 563180a44b7d7978f44e9776eedfbbc550c2398d\n\nUse just queue_lock in bfq_check_ioprio_change\n\nPort commit d93a11f1cd890d4ea72f7cef75fac56801b099b3\n\nPort commit 2da8de0bb799bf2bdfa893e5a1e294eb6bafba62\n\nPort commits 322731ed0dd and d4aad7ff04d\n\nPort commit 30d7b9448f03f2c82d0fd44738674cc156a8ce0a\n\nBUGFIX: Extend rcu locking in bfq_bic_update_cgroup\n\nDrop unnecessary synchronize_rcu\n\nBFQ v8-rc3\n\nBUGFIX: fix typo in constant definition\n\nTell whether cgroups support is enabled at boot\n\nSuggested-by: Lee Tibbert <lee.tibbert@gmail.com>\n\nBFQ v8-rc4\n\nBUGFIX: removed ref-incrememnt typo from a log message\n\nImprove code\n\nBFQ v8-rc5\n\nBUGFIX: remove a harmless but meaningless comparison\n\nRemoved stale fields and comments\n\nAdd missing comment\n\nRemove stale field\n\nFurther code cleanup\n\nMove inline and improve data-structure comments, remove stale fields\n\nBFQ v8-rc6\n\nBFQ v8\n\nChange suspect BUG_ON and add more BUG_ONs\n\nChanged weight type\n\nAdd weight-changed log message\n\nPrivilege soft rt apps against interactive\n\nBFQ v8r1\n\nRemove variables not used if tracing is disabled\n\nReported-by: Lee Tibbert <lee.tibbert@gmail.com>\n\nPort commit ae11889636: turn blkg_lookup_create into blkg_lookup\n\nBFQ v8r2\n\nFix switch from soft rt to interactive\n\nBFQ v8r3\n\nUpdate copyrigths to acknowledge Linaro's support\n\nSigned-off-by: <paolo.valente@linaro.org>\n\nPort to v4.8, 3rd part: switch slice_timer and fifo_expire to ns\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nPort to v4.8, 4th part: switch slice_idle and thinktime to ns\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nFix handling of wait_request state\n\nThe semantics of hrtimers makes the following assumption false\nafter invoking hrtimer_try_to_cancel: the timer results as non\nactive. Unfortunately this assumption was used in the previous\nversion of the code. This commits lets code comply with the\nnew semantics.\n\nFix and extend logs, make other micro-improvements\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nImprove the peak-rate estimator\n\nThis commit is a complete rewrite of the peak-rate estimation algorithm.  It is\nboth an improvement and a simplification: in particular it replaces the\nprevious, less effective, stable and clear algorithm for estimating the peak\nrate.  The previous algorihtm approximated the service rate using the\nindividual dispatch rates observed during the service slots of queues. As such,\nit took into account not only just individual queue workloads, but also rather\nshort time intervals.  The new algorithm considers the global workload served\nby the device, and computes the peak rate over much larger time intervals. This\nmakes the new algorihtm extremely more effective with queueing devices and, in\ngeneral, with devices with a fluctuating bandwidth, either physical or virtual.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nForce one-request-at-a-time service scheme with strict_guarantees\n\nForce device to serve one request at a time if strict_guarantees is true.\nForcing this service scheme is currently the ONLY way to guarantee that the\nrequest service order enforced by the scheduler is respected by a queueing\ndevice. Otherwise the device is free even to make some unlucky request wait\nfor as long as the device wishes.\n\nOf course, serving one request at at time may cause loss of throughput.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nFix use of slice_idle and use smaller type\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nGuarantee that wr is not lost for a spurious temporary merge\n\nIf a queue Q1 is merged with an already-shared queue Q2, then Q1\nmay easily be freed soon after this event. If this happens and\nthe merge lasts little, then Q1 may be created again at a time\ninstant at which it had still to enjoy weight raising. This\ncommit checks that, and restores weight raising for the queue\nif it is the case.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nFix recovery of lost service for soft rt\n\nBFQ tries to let soft real-time queues recover the service they lose when,\nalthough weight-raised and backlogged, they are not set in service soon. This\nrecovery is important for a soft real-time queue, because its weight-raising\nperiod is rather short, and thus a service hole can easily cause the queue the\nhave already lost weight raising when it eventually restarts to be served (and\ntherefore before the queue can prove that it deserves its short weight-raising\nperiod to be moved forward).\n\nUnfortunately, there were some mistakes in the formula for computing the extent\nof the service holes, which caused occasional overcompensations of holes. This\ncommit fixes the formula.\n\nSigned-off-by: Luca Miccio <lucmiccio@gmail.com>\n\nLet soft-rt wr start also while interactive wr is still in place\n\nThe quality of the service provided to a soft real-time application (e.g.,\naudio/video playback) is maximum if the application starts to enjoy soft-rt\nweight raising as it has finished its start-up. In this respect, to guarantee\nthe shortest-possible start-up time to applications, BFQ lets just-created\napplications enjoy (a milder) weight-raising for a while. During this first\nweight-raising period, which we can refer to as 'interactive', the application\ncould not switch to soft real-time weight raising, even if it met the\nrequirements ifor the switch, i.e., even if the actual start-up had finished,\nand the application had started doing its soft real-time job.\n\nThis commits allows soft real-time weight raising to start for a queue, and\nthus for the associated application, even while the queue is still enjoying\ninteractive weight raising.\n\nThis anticipated switch to soft real-time weight raising must be managed with\na little care.  In case of a spurious, temporary switch, a queue may unjustly\nlose any form of weight raising when it then loses soft real-time weight\nraising. If the queue is associated with an application which, e.g., is\nactually still starting up, then BFQ will not help the application start\nquickly any longer.  To avoid this problem, the interactive weight-raising\nstate of a queue is restored if the queue loses its soft real-time weight\nraising when its interactive weight-raising period is not yet over.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nSwitch to ns for all rate timestamps, fixing also 32-bit issues\n\nSigned-off-by: Luca Miccio <lucmiccio@gmail.com>\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nblock: bfq: fix Oops at system shutdown\n\nCommit fbca70d33072 (\"Port commit ae11889636: turn blkg_lookup_create into\nblkg_lookup\") introduced the possibility of bfq_find_set_group returning a\nNULL pointer. When this happened in __bfq_bic_change_cgroup,\nit caused an Oops a few lines later. This Oops was reported as reliably\nhappening on one machine on the sync_bfqq path at system shutdown.\n\nThis patch restores the prior behavior of falling back to using the\nbfqd->root_group if bfqg is NULL. The behavior is restored, but at\na different place.\n\nNote Well: This patch assumes that the prior behavior was correct.\n     \t   That assumption may not be warranted.\n\nSigned-off-by: Lee Tibbert <LeeTibbert@users.noreply.github.com>\n\nBFQ-v8r4\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nDocumentation/block: add bfq-iosched.txt\n\nDocumentation of BFQ benefits, inner workings, interface and tunables.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBUGFIX: Replace max wrongly used for modulo numbers\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nImprove bfq-iosched.txt\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nImprove help message in Kconfig.iosched\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nRemove stray disk word in first line\n\nSIgned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nbfq-iosched.txt: add description of preemption\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nAdd parentheses to complex macros\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nFix type in bfq-iosched.txt\n\nSigend-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBFQ-v8r5\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nImprove documentation\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nSquash me\n\nAdd and improve pointers in initial comments\n\nFix typo in comments on bfq_lookup_next_entity\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nFix false-positive warning for uninitialized var\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nImprove and fix some bugs in hierarchical code\n\nThis commit provides the following contributions.\n\nBUGFIX Removed the check that, when the new queue to set in service\nmust be selected, the cached next_in_service entities coincide with\nthe entities chosen by __bfq_lookup_next_entity. This check,\nissuing a warning on failure, was wrong, because the cached and the\nnewly chosen entity could differ in case of a CLASS_IDLE timeout.\n\nEFFICIENCY IMPROVEMENT (this improvement is related to the above\nBUGFIX) The cached next_in_service entities are now really used to\nselect the next queue to serve when the in-service queue\nexpires. Before this change, the cached values were used only for\nextra (and in general wrong) consistency checks. This caused\nadditional overhead instead of reducing it.\n\nEFFICIENCY IMPROVEMENT The next entity to serve, for each level of the\nhierarchy, is now updated on every event that may change it, i.e., on\nevery activation or deactivation of any entity. This finer granularity\nis not strictly needed for corectness, because it is only on queue\nexpirations that BFQ needs to know what are the next entities to\nserve. Yet this change makes it possible to implement optimizations in\nwhich it is necessary to know the next queue to serve before the\nin-service queue expires.\n\nSERVICE-ACCURACY IMPROVEMENT The per-device CLASS_IDLE service timeout\nhas been turned into a much more accurate per-group timeout.\n\nCODE-QUALITY IMPROVEMENT The non-trivial parts touched by the above\nimprovements have been partially rewritten, and enriched of comments,\nso as to improve their transparency and understandability.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBFQ v8r6-rc1\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nPort and improve CFQ commit 41647e7a\n\nBFQ currently used the same logic for detecting seeky queues for\nfor rotational disks and SSDs. This logic is appropriate for the\nformer, as it takes into account only inter-request distance, and\nthis is the dominant latency factor on a rotational device. Yet\nthings change with flash-based devices, where servign a large\nrequests still yields a high throughput, even the request is far\nfrom the previous request served. This commits extends seeky\ndetection to take into accoutn also this fact with flash-based\ndevices. In particular, this commit is an improved port of the\noriginal commit 41647e7a for CFQ.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nProvide more details in switching-off-wr message\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nRemove useless parameter from bfq_del_bfqq_busy\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nFurther improve code and comments for hierarchical code\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nOptimize update of next_in_service entity\n\nIf the update of the next_in_service candidate entity is triggered by\nthe activation of an entity, then it is not necessary to perform full\nlookups in the active trees to update next_in_service. In fact, it is\nenough to check whether the just-activated entity has a higher\npriority of next_in_service, or, even if it has the same priority as\nnext_in_service, is eligible and has a lower virtual finish time than\nnext_in_service. If this compound condition holds, then the new entity\nbecomes the new next_in_service. Otherwise no change is needed. This\ncommit implements this optimization.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nFix bug causing occasional loss of weight raising\n\nWhen a bfq_queue, say bfqq, is split after a merging with another\nbfq_queue, BFQ checks whether it has to restore for bfqq the\nweight-raising state that bfqq had before being merged.  In\nparticular, the weight-raising is restored only if, according to the\nweight-raising duration decided for bfqq when it started to be\nweight-raised (before being merged), bfqq would not have already\nfinished its weight-raising period.\n\nYet, by mistake, such a duration is not saved when bfqq is merged. So,\nif bfqq is freed and reallocated when it is split, then this duration\nis wrongly set to zero on the split. As a consequence, the\nweight-raising state of bfqq is wrongly not restored, which causes BFQ\nto fail in guaranteeing a low latency to bfqq.\n\nThis commit fixes this bug by saving weight-raising duration when bfqq\nis merged, and correctly restoring it when bfqq is split.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nFix wrong reset of in-service entities\n\nIn-service entities were reset with an indirect logic, which\nhappened to be even buggy for some cases. This commit fixes\nthis bug in two important steps. First, by replacing this\nindirect logic with a direct logic, in which all involved\nentities are immediately reset, with a bubble-up loop, when\nthe in-service queue is reset. Second, by restructuring the\ncode related to this change, so as to become not only correct\nwith respect to this change, but also cleaner and hopefully\nclearer.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nAdd code to redirect trace log to console\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBFQ v8r6-rc2\n\nFix bug in optimized update of next_in_service entity\n\nThere was a case where bfq_update_next_in_service did not update\nnext_in_service, even if it might need to be changed: in case of\nrequeueing or repositioning of the entity that happened to be\npointed exactly by next_in_service. This could result in violation\nof service guarantees, because, after a change of timestamps for\nsuch an entity, it might be the case that next_in_service had to\npoint to a different entity. This commit fixes this bug.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nStop bubble-up of next_in_service update if possible\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBFQ v8r6-rc3\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBFQ-v8r6\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBUGFIX: make BFQ compile also without hierarchical support\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBFQ-v8r7\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nRemove wrong compilation warning\n\nBUGFIX: Removed a wrong compilation warning, due to the compiler\nnot taking into account short circuit in a condition.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nAdd a ton of forgotten static qualifiers\n\nBUGIFX: Added several forgotten static qualifiers in function\ndefinitions (completely harmless issue).\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBUGFIX: Put async queues on exit also without cgroups\n\nBUGFIX: The putting of async queues on scheduler exit was missing in case\ncgroups support was not active. This fix adds the missing operation.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nFix check of the percentage of sequential dispatches\n\nBUGFIX: In the peak-rate estimator, there was a serious error in the\ncheck that the percentage of sequential I/O-request dispatches was high\nenough to trigger an update of the peak-rate estimate. This commit fixes\nthat check.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBetter tune weight-raising for slow flash-based devices\n\nIMPROVEMENT Luca Miccio has run a few responsiveness tests on recent\nAndroid systems with average-speed storage devices. These tests have\nshown that the following BFQ parameter was too low for these systems:\nreference duration for slow storage devices of weight raising for\ninteractive applications. This commit raises that duration to a\nvalue that is yelding optimal results in our tests.\n\nSigned-off-by: Luca Miccio <lucmiccio@gmail.com>\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBFQ-v8r8-rc1\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nAvoid a second dispatch in case of budget exhaustion\n\nIMPROVEMENT This commit anticipates the complete check of budget exhaustion,\nfor the in-service bfq_queue, to when the next bfq_queue to serve is selected\n(during a dispatch operation). This enables a new bfq_queue to be immediately\nselected for service in case the in-service bfq_queue has actually exhausted\nits budget. As a consequence, a second dispatch invocation is not needed\nany more, to have a new request dispatched.\nTo implement this improvement, this commit implements a further improvement\ntoo: the field next_rq of a bfq_queue now always contains the actual next\nrequest to dispatch (or NULL if the bfq_queue is empty).\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBFQ-v8r8-rc2\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nblock/bfq-cgroup: fix bfq_bic_update_cgroup() API\n\nbfq_bic_update_cgroup() should return nothing even if\nCONFIG_BFQ_GROUP_IOSCHED is disabled.\n\nSigned-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>\n\nBFQ-v8r8\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBUGIFX: remove use of bfq queues after free\n\nbfq queues occasionally happened to be used after being freed, because\nthey were accessed after some invocations of bfq_put_queue that could\ncause them to be freed. This commit refactors code, when needed, to\navoid any occurrence of such a use-after-free of a bfq queue. This\ncommit also adds comments to make references to bfq queues easier to\nfollow.\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBFQ-v8r9\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBUGFIX: Handle failure of weight-counter allocation\n\nReported-by: Bart Van Assche <Bart.VanAssche@sandisk.com>\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBUGFIX: Remove problematic check on max service duration\n\nReported-by: Bart Van Assche <Bart.VanAssche@sandisk.com>\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBFQ-v8r10-rc1\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nBFQ-v8r10\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\n\nblock: bfq: Adjustments for 3.18 kernel\nSigned-off-by: djb77 <dwayne.bakewell@gmail.com>","distinct":true,"url":"https://api.github.com/repos/mawrick26/S7E-O5/commits/6355ad386be3a4b254ae3db78dcd1938509fcad2"},{"sha":"35243d13d8c67806d66b61862b88960859bfcfdb","author":{"name":"Paolo Valente","email":"77843028b8f8419c9977951e271784ccf7804be9@linaro.org"},"message":"block/bfq: use pointer entity->sched_data only if set\n\nIn the function __bfq_deactivate_entity, the pointer\nentity->sched_data could happen to be used before being properly\ninitialized. This led to a NULL pointer dereference. This commit fixes\nthis bug by just using this pointer only where it is safe to do so.\n\nReported-by: Tom Harrison <l12436.tw@gmail.com>\nTested-by: Tom Harrison <l12436.tw@gmail.com>\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\nSigned-off-by: FAROVITUS <farovitus@gmail.com>\nSigned-off-by: djb77 <dwayne.bakewell@gmail.com>","distinct":true,"url":"https://api.github.com/repos/mawrick26/S7E-O5/commits/35243d13d8c67806d66b61862b88960859bfcfdb"},{"sha":"0537a52965310fb9d460c13488b361b9a55d6f00","author":{"name":"Colin Ian King","email":"d100aa70785e45ee8deab668147d941941915c21@canonical.com"},"message":"block/bfq: don't dereference bic before null checking it\n\nThe call to bfq_check_ioprio_change will dereference bic, however,\nthe null check for bic is after this call.  Move the the null\ncheck on bic to before the call to avoid any potential null\npointer dereference issues.\n\nDetected by CoverityScan, CID#1430138 (\"Dereference before null check\")\n\nSigned-off-by: Colin Ian King <colin.king@canonical.com>\nSigned-off-by: Jens Axboe <axboe@fb.com>\nSigned-off-by: FAROVITUS <farovitus@gmail.com>\nSigned-off-by: djb77 <dwayne.bakewell@gmail.com>","distinct":true,"url":"https://api.github.com/repos/mawrick26/S7E-O5/commits/0537a52965310fb9d460c13488b361b9a55d6f00"},{"sha":"75d21821c522511e3e451984498a6b5643c7cee2","author":{"name":"Paolo Valente","email":"77843028b8f8419c9977951e271784ccf7804be9@linaro.org"},"message":"block/bfq: BFQ-v8r11\n\nSigned-off-by: Paolo Valente <paolo.valente@linaro.org>\nSigned-off-by: FAROVITUS <farovitus@gmail.com>\nSigned-off-by: djb77 <dwayne.bakewell@gmail.com>","distinct":true,"url":"https://api.github.com/repos/mawrick26/S7E-O5/commits/75d21821c522511e3e451984498a6b5643c7cee2"}]}
{"actor":{"display_login":"mawrick26"}}