[PATCH 0/4] Inline some hashtab functions to improve performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Right now, hashtab_search(), hashtab_insert(), and hashtab_map() are
defined in hashtab.c and need to call functions indirectly. It turns
out that defining (the relevent parts of) these functions inline in the
header and passing the function pointers as arguments makes them
significantly faster (at least in the hashtab_search() case).

The first two patches in the series are two small simplifications that
are not directly related, but the rest won't apply without them. The
third patch then converts the hashtab interface to prepare for the
inlining and the last one finishes the job by just moving some of the
function definitions to the header. These could be also just one patch,
but are kept separate for easier review of changes in the functions
being moved around.

For more details, please refer to the respective patch descriptions.

Ondrej Mosnacek (4):
  selinux: simplify range_write()
  selinux: do not allocate hashtabs dynamically
  selinux: prepare for inlining of hashtab functions
  selinux: complete the inlining of hashtab functions

 security/selinux/ss/conditional.c |   4 +-
 security/selinux/ss/conditional.h |   2 +-
 security/selinux/ss/hashtab.c     | 112 ++-------------
 security/selinux/ss/hashtab.h     | 101 ++++++++++---
 security/selinux/ss/mls.c         |  23 +--
 security/selinux/ss/policydb.c    | 230 ++++++++++++++++--------------
 security/selinux/ss/policydb.h    |  15 +-
 security/selinux/ss/services.c    |  54 +++----
 security/selinux/ss/symtab.c      |  25 +++-
 security/selinux/ss/symtab.h      |   5 +-
 10 files changed, 294 insertions(+), 277 deletions(-)

-- 
2.25.4




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux