[libvirt] [PATCH 0/3] Decrease execution complexity of formating iothread scheduler info

Peter Krempa pkrempa at redhat.com
Tue Mar 22 14:00:10 UTC 2016


While refactoring the old way to store iothread scheduler info I've added an
algorithm that isn't entirely optimal but allows to store the scheduler info in
a sane way. Unfortunately when you specify an insane number of iothreads the
code takes ages to execute.

To avoid this series being completely useless except for the one corner case
I've opted to finally add support for self expanding bitmaps, which might become
useful in the future. The self-expanding bitmap is then used instead of one of
the loops that was necessary to determine the maximum iothread ID.

Peter Krempa (3):
  util: bitmap: Intoduce self-expanding bitmap APIs
  conf: decrease iterations complexity when formatting iothreads
  conf: Remove now unused virDomainIOThreadIDMap

 src/conf/domain_conf.c   | 51 ++++++++++----------------
 src/conf/domain_conf.h   |  3 --
 src/libvirt_private.syms |  4 ++-
 src/util/virbitmap.c     | 93 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/util/virbitmap.h     |  8 +++++
 tests/virbitmaptest.c    | 51 ++++++++++++++++++++++++++
 6 files changed, 173 insertions(+), 37 deletions(-)

-- 
2.7.3




More information about the libvir-list mailing list