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

[PATCH for-4.17 v1 2/2] xenctrl: use larger chunksize in domain_getinfolist


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Edwin Török <edvin.torok@xxxxxxxxxx>
  • Date: Tue, 1 Nov 2022 17:59:17 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <pau.safont@xxxxxxxxxx>, Edwin Török <edvin.torok@xxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Tue, 01 Nov 2022 18:00:00 +0000
  • Ironport-data: A9a23:W9spzqqhDI3c791hhctDyL4LHM1eBmIaZRIvgKrLsJaIsI4StFCzt garIBnVPqmCZmT8fd4jOYjj9ksHvZXTmoNrSwA5/i82QXkR8JuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpAFc+E0/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06W5wUmAWP6gR5gaHzyBNVvrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXAC5VagyTnOOI/KOQa7ZQjM5yL5DPGqpK7xmMzRmBZRonaZXKQqGM7t5ExjYgwMtJGJ4yZ eJAN2ApNk6ZJUQSZBFHU/rSn8/x7pX7WzBUtlOT47Yw+W/Q5AdwzKLsIJzefdniqcB9zh3F+ z+XrzmR7hcyM/qdy2CcyG6Wv8jipn76VIwONYaq+as/6LGU7jNKU0BHPbehmtGph0j7V99BJ kg8/is1sbN05EGtVsP6XRCzvDiDpBF0c9ZZDeAS8gyGzavQpQGDCQAsUTppeNEg8sgsSlQXO kShxo2zQ2Y16fvMFCzbpuz8QS6O1TY9MzcGeT8fTDU58vLC/705hEPMF/JFOfvg5jHqIg3Yz zePpSk4orwci88Xyqm2lWz6byKQSovhFVBsuFiONo6xxkYgPdP+OdT0gbTOxawYRLt1WGVtq 5TtdyK2yOkVRa+AmyWWKAnmNOH4vq3VWNEwbLMGInXAy9hP0yT9FWyzyGskTKuMDirjUWawC HI/QSsLuPdu0IKCNMebmb6ZBcUw1rTHHt/4TP3SZdcmSsEvKlDdoHg1PxXBgj2FfK0QfUYXY MnzTCpRJSxCVfQPIMSeGo/xLoPHNghhnDiOFPgXPjys0KaEZW79dFv2GALmUwzN14vd+V29z jqqH5HVo/mpeLGhP3K/HE96BQxiEEXX8rit8JcKKrHYclM4cIzjYteIqY4cl0Vet/w9vo/1E ruVAye0FHKXaaX7FDi3
  • Ironport-hdrordr: A9a23:hiF3n62h8t59zmxs1GuCIAqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoVj6faUskd2ZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOcOEYZmIasS+V2maF+q4bsbu6zJw=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The support limit of XAPI is 1000, so using 1024 will very likely get
everything in one go.
Other code in Xen also uses chunk sizes of 256 or 1024, and would be
much better than 2, especially now that list construction is more
efficient.

Xenopsd should also use `domain_getinfo` instead of `domain_getinfolist`
in a lot of places where info list is used, but that is another
optimization.

Signed-off-by: Edwin Török <edvin.torok@xxxxxxxxxx>
Tested-by: Pau Ruiz Safont <pau.safont@xxxxxxxxxx>
---
 tools/ocaml/libs/xc/xenctrl.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml
index 3ebedffdc7..a56539ff2c 100644
--- a/tools/ocaml/libs/xc/xenctrl.ml
+++ b/tools/ocaml/libs/xc/xenctrl.ml
@@ -237,7 +237,7 @@ let rev_append_fold acc e = List.rev_append e acc
 let rev_concat lst = List.fold_left rev_append_fold [] lst
 
 let domain_getinfolist handle first_domain =
-       let nb = 2 in
+       let nb = 1024 in
        let rec __getlist lst from =
                (* _domain_getinfolist returns domains in reverse order, 
largest first *)
                match _domain_getinfolist handle from nb with
-- 
2.34.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.