From patchwork Tue Apr 27 00:22:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 12225207 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37731C433B4 for ; Tue, 27 Apr 2021 00:24:02 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0661613AB for ; Tue, 27 Apr 2021 00:24:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0661613AB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.117944.223863 (Exim 4.92) (envelope-from ) id 1lbBVq-0007mq-EJ; Tue, 27 Apr 2021 00:23:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 117944.223863; Tue, 27 Apr 2021 00:23:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbBVq-0007mj-BA; Tue, 27 Apr 2021 00:23:38 +0000 Received: by outflank-mailman (input) for mailman id 117944; Tue, 27 Apr 2021 00:23:37 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lbBVo-0007mO-NU for xen-devel@lists.xenproject.org; Tue, 27 Apr 2021 00:23:36 +0000 Received: from out1-smtp.messagingengine.com (unknown [66.111.4.25]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 5cfe31a5-7ee7-4350-b395-082a8645ab5d; Tue, 27 Apr 2021 00:23:36 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id C94975C0185; Mon, 26 Apr 2021 20:23:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 26 Apr 2021 20:23:35 -0400 Received: from localhost.localdomain (ip5b434f04.dynamic.kabel-deutschland.de [91.67.79.4]) by mail.messagingengine.com (Postfix) with ESMTPA id DE1C11080066; Mon, 26 Apr 2021 20:23:34 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5cfe31a5-7ee7-4350-b395-082a8645ab5d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=9JA14x ievcjIUIwWayy4OYytev3Y9fSXpEqU52FkmQk=; b=W8w0PEipskmQ1hyE4Z6w60 DtvGC1V2p44UmGSWjkTZ3EkGk6zcqAr15mzIAXDpb5EuDV6uBPG3rvKWI8YOAjGx bVsLEIfG17sL529hx3xcD/TXMYGyPgBR3pS5JoV8j9EXtjVLB+9e/VmnvsCfPZ0/ x75xs3A1bmJVtMppKA5k2qhM/GR2H8sUXp3O4jpviQnP3+QaWfFFvw+NjdZW+jEH zZgGNfv/ij+80vwcK74uij7sOVDeTZpD6nXGMfQ+mtcWJi2oeQaZuOTZm/anXcxV Grj0EoI6IESEqpKUbqXkM8c/Fu/Xbb+zhJqQrk/YKXRVjrzjI7Rbm96r98KjHxVQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdduledgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffogggtgfesthekredtredtjeenucfhrhhomhepofgrrhgvkhcu ofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomhgrrhhmrghrvghksehinhhvih hsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggftrfgrthhtvghrnheptdevvdev ffetffevhfevhffhteefffdvheelleffjeelhfefgfeljeejffekueefnecuffhomhgrih hnpehpohgurdhinhenucfkphepledurdeijedrjeelrdegnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrrhhmrghrvghksehinhhvihhsih gslhgvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= , Ian Jackson , Wei Liu , Anthony PERARD Subject: [RFC PATCH 0/2] libxl: support common cases without block script Date: Tue, 27 Apr 2021 02:22:30 +0200 Message-Id: X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 This series in an attempt to speed up the domain start by removing slow block script from the picture. The current RFC covers the simplest possible case only - target being a block device directly. This case does not require locking at all. Further version will cover also setting up a loop device. This, compared to the default block script, saves about 0.5s of domain start time, per disk. Similar speedup can be achieved with a trivial lock-less script too. But for file-based disks, it won't be that simple with a script - setting up a loop device lock-less is tricky and ability to keep an FD open and call different ioctls on it greatly helps. Furthermore reusing the same loop device for the same file can be done significantly better with a cache (which can be stored in the libxl hosting process - like xl devd, or libvirt). This surely isn't the only option to improve disk setup time, but is a very atractive one. Few questions: 1. Is it acceptable approach at all? 2. Is empty 'script' parameter value going to fly? Unfortunately, NULL is already taken as "use default". Marek Marczykowski-Górecki (2): libxl: rename 'error' label to 'out' as it is used for success too libxl: allow to skip block script completely docs/man/xl-disk-configuration.5.pod.in | 4 ++- tools/libs/light/libxl_disk.c | 7 ++- tools/libs/light/libxl_linux.c | 68 ++++++++++++++++++++++++-- 3 files changed, 74 insertions(+), 5 deletions(-) base-commit: bea65a212c0581520203b6ad0d07615693f42f73