From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web08.1730.1610703288170452692 for ; Fri, 15 Jan 2021 01:34:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JwnpjZu5; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610703287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bddHE2RmbxYm9KqGviPdMCkcKnG/aNJg85TWK/TeEyE=; b=JwnpjZu5Ysj1ew1cOHfyJKh2ThMfasDKRhFyZUCyFovQdyANr5dVWHies5stiiV29TXKoV SXx583oycZj9KAJYCDsdG5QoRLEo27VRCb8wMe7mcGOtRbGFx5gqRsulFZQMCcZncAN+38 0Es7jJh1pz/K3Bn2GpRmteC/fVb+yQM= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-410-pBxWkoB1NS6f_riX7FQnUA-1; Fri, 15 Jan 2021 04:34:44 -0500 X-MC-Unique: pBxWkoB1NS6f_riX7FQnUA-1 Received: by mail-ej1-f69.google.com with SMTP id d19so3385017ejo.18 for ; Fri, 15 Jan 2021 01:34:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bddHE2RmbxYm9KqGviPdMCkcKnG/aNJg85TWK/TeEyE=; b=SVeXUOBvJ+MU9OvNxQVBKQ0kBPqsS21+1m3ul1dzbt0r1fehYZitSmaBrRugNtYHAy JFiRpx2B64ZqLQMe66rxtvHfIqvyB1A/zQDeGaRszVytRG6HRgmqTs2yZPW6vHq+APFS lsl6t45/WgC99swRj+M+MDW460RCO9Tnyh9SyYD4tfoRP/kppD4LRsMTFbdOW/1QCQlB dHSe3wVQWM2HgAbeZZ9KotMkBZftbYVxwmx56HakTwqY/nUpk9Ejqfb9jzgCMLrzmSJD TKayIA496waAvX3arK8AP7bdVQJDoRAKUyvTFrZBdCqcU/W/7UqZBycHaAAwHcsJ0Ax2 OY8A== X-Gm-Message-State: AOAM532QxPz6dxjlQgI7q1kP4KmHi+3XQigFTuMTO4aklknaE8aR8sv5 GkaSzPjMG2H0WUdTKdvDYXZn13uMTKZ4j+rlhyrBSQtyUfaXYStiBX+EMXrG8+txXnIDc74jOsE 3grK4dI6WixsR8w== X-Received: by 2002:a05:6402:1714:: with SMTP id y20mr8575530edu.360.1610703282841; Fri, 15 Jan 2021 01:34:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoIsBO9vTLrAKUWjtHeqOJ962HGHTCW7zHAb0MyON8g7g0QPE+9X8M1aM985IJNtV0UVux7Q== X-Received: by 2002:a05:6402:1714:: with SMTP id y20mr8575519edu.360.1610703282697; Fri, 15 Jan 2021 01:34:42 -0800 (PST) Return-Path: Received: from [192.168.1.36] (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id ke7sm3023411ejc.7.2021.01.15.01.34.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jan 2021 01:34:42 -0800 (PST) Subject: Re: [PATCH v2 02/10] OvmfPkg: raise PcdShellFileOperationSize to 128KB To: Laszlo Ersek , devel@edk2.groups.io Cc: Ard Biesheuvel , Jordan Justen References: <20210113085453.10168-1-lersek@redhat.com> <20210113085453.10168-3-lersek@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <6ca294e1-d19a-8d80-94c4-372c06b0df6b@redhat.com> Date: Fri, 15 Jan 2021 10:34:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210113085453.10168-3-lersek@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Hi Laszlo, On 1/13/21 9:54 AM, Laszlo Ersek wrote: > Some UEFI shell commands read and write files in chunks. The chunk size is > given by "PcdShellFileOperationSize", whose default in > "ShellPkg/ShellPkg.dec" is 4KB (0x1000). > > The virtio-fs daemon of QEMU advertizes a 128KB maximum buffer size by > default, for the FUSE_WRITE operation. I delayed this patch review because I couldn't find where this value is advertized in QEMU (virtiofsd is very new to me). Can you enlighten me please? > By raising PcdShellFileOperationSize 32-fold, the number of FUSE write > requests shrinks proportionately, when writing large files. And when a > Virtio Filesystem is not used, a 128KB chunk size is still not > particularly wasteful. > > Some ad-hoc measurements on my laptop, using OVMF: > > - The time it takes to copy a ~270MB file from a Virtio Filesystem to the > same Virtio Filesystem improves from ~9 seconds to ~1 second. > > - The time it takes to compare two identical ~270MB files on the same > Virtio Filesystem improves from ~11 seconds to ~3 seconds. > > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Philippe Mathieu-Daudé > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3125 > Signed-off-by: Laszlo Ersek > Acked-by: Ard Biesheuvel > --- > > Notes: > v2: > - no changes > - pick up Ard's A-b > > OvmfPkg/OvmfPkgIa32.dsc | 2 ++ > OvmfPkg/OvmfPkgIa32X64.dsc | 2 ++ > OvmfPkg/OvmfPkgX64.dsc | 2 ++ > 3 files changed, 6 insertions(+)