Skip to content
  1. Dec 29, 2021
    • Federico Motta's avatar
      block, bfq: fix asymmetric scenarios detection · e867d620
      Federico Motta authored
      commit 98fa7a3e upstream.
      
      Since commit 2d29c9f8 ("block, bfq: improve asymmetric scenarios
      detection"), a scenario is defined asymmetric when one of the
      following conditions holds:
      - active bfq_queues have different weights
      - one or more group of entities (bfq_queue or other groups of entities)
        are active
      bfq grants fairness and low latency also in such asymmetric scenarios,
      by plugging the dispatching of I/O if the bfq_queue in service happens
      to be temporarily idle. This plugging may lower throughput, so it is
      important to do it only when strictly needed.
      
      By mistake, in commit '2d29c9f8' ("block, bfq: improve asymmetric
      scenarios detection") the num_active_groups counter was firstly
      incremented and subsequently decremented at any entity (group or
      bfq_queue) weight change.
      
      This is useless, because only transitions from active to inactive and
      vice versa matter for that counter. Unfortunately this is also
      incorrect in the following case: the entity at issue is a bfq_queue
      and it is under weight raising. In fact in this case there is a
      spurious increment of the num_active_groups counter.
      
      This spurious increment may cause scenarios to be wrongly detected as
      asymmetric, thus causing useless plugging and loss of throughput.
      
      This commit fixes this issue by simply removing the above useless and
      wrong increments and decrements.
      
      Fixes: 2d29c9f8
      
       ("block, bfq: improve asymmetric scenarios detection")
      Tested-by: default avatarOleksandr Natalenko <oleksandr@natalenko.name>
      Signed-off-by: default avatarFederico Motta <federico@willer.it>
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e867d620
    • Federico Motta's avatar
      block, bfq: improve asymmetric scenarios detection · e4cd53c6
      Federico Motta authored
      commit 2d29c9f8
      
       upstream.
      
      bfq defines as asymmetric a scenario where an active entity, say E
      (representing either a single bfq_queue or a group of other entities),
      has a higher weight than some other entities.  If the entity E does sync
      I/O in such a scenario, then bfq plugs the dispatch of the I/O of the
      other entities in the following situation: E is in service but
      temporarily has no pending I/O request.  In fact, without this plugging,
      all the times that E stops being temporarily idle, it may find the
      internal queues of the storage device already filled with an
      out-of-control number of extra requests, from other entities. So E may
      have to wait for the service of these extra requests, before finally
      having its own requests served. This may easily break service
      guarantees, with E getting less than its fair share of the device
      throughput.  Usually, the end result is that E gets the same fraction of
      the throughput as the other entities, instead of getting more, according
      to its higher weight.
      
      Yet there are two other more subtle cases where E, even if its weight is
      actually equal to or even lower than the weight of any other active
      entities, may get less than its fair share of the throughput in case the
      above I/O plugging is not performed:
      1. other entities issue larger requests than E;
      2. other entities contain more active child entities than E (or in
         general tend to have more backlog than E).
      
      In the first case, other entities may get more service than E because
      they get larger requests, than those of E, served during the temporary
      idle periods of E.  In the second case, other entities get more service
      because, by having many child entities, they have many requests ready
      for dispatching while E is temporarily idle.
      
      This commit addresses this issue by extending the definition of
      asymmetric scenario: a scenario is asymmetric when
      - active entities representing bfq_queues have differentiated weights,
        as in the original definition
      or (inclusive)
      - one or more entities representing groups of entities are active.
      
      This broader definition makes sure that I/O plugging will be performed
      in all the above cases, provided that there is at least one active
      group.  Of course, this definition is very coarse, so it will trigger
      I/O plugging also in cases where it is not needed, such as, e.g.,
      multiple active entities with just one child each, and all with the same
      I/O-request size.  The reason for this coarse definition is just that a
      finer-grained definition would be rather heavy to compute.
      
      On the opposite end, even this new definition does not trigger I/O
      plugging in all cases where there is no active group, and all bfq_queues
      have the same weight.  So, in these cases some unfairness may occur if
      there are asymmetries in I/O-request sizes.  We made this choice because
      I/O plugging may lower throughput, and probably a user that has not
      created any group cares more about throughput than about perfect
      fairness.  At any rate, as for possible applications that may care about
      service guarantees, bfq already guarantees a high responsiveness and a
      low latency to soft real-time applications automatically.
      
      Signed-off-by: default avatarFederico Motta <federico@willer.it>
      Signed-off-by: default avatarPaolo Valente <paolo.valente@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4cd53c6
    • Greg Jesionowski's avatar
      net: usb: lan78xx: add Allied Telesis AT29M2-AF · 7a4cd349
      Greg Jesionowski authored
      commit ef8a0f6e
      
       upstream.
      
      This adds the vendor and product IDs for the AT29M2-AF which is a
      lan7801-based device.
      
      Signed-off-by: default avatarGreg Jesionowski <jesionowskigreg@gmail.com>
      Link: https://lore.kernel.org/r/20211214221027.305784-1-jesionowskigreg@gmail.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7a4cd349
  2. Dec 22, 2021