From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5B05C433FE for ; Tue, 10 May 2022 13:19:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1E9066B0072; Tue, 10 May 2022 09:19:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1725F6B0073; Tue, 10 May 2022 09:19:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F2D8F6B0074; Tue, 10 May 2022 09:19:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id DE1366B0072 for ; Tue, 10 May 2022 09:19:12 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id B58EB817D7 for ; Tue, 10 May 2022 13:19:12 +0000 (UTC) X-FDA: 79449889344.29.96D20BA Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by imf07.hostedemail.com (Postfix) with ESMTP id 5703F40092 for ; Tue, 10 May 2022 13:19:06 +0000 (UTC) Received: by mail-pl1-f182.google.com with SMTP id i17so16714685pla.10 for ; Tue, 10 May 2022 06:19:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=sh6ZfehXLaJ7xf8De4B54CxjZg1Ny7yY0hSdnd+MRLg=; b=Nn2Kn6HF1IGXiegiEP//KKeoQ3a5gEDosit+4aD15YZU7J8VKyPLtB8f0ADZ84uXxm uKUhFaM6otQVHlBMUGiFLo69B8ELex8xqVCK/AEgZbHjgy0IXvlrWm/AkkH+6e9yOmjr vU03hklOK6Hk59iOgL0T4GvQy/ry1yizkfp83ACT9mP4Y/fayzlObYCrVI0dHNIqt5px 0+tAlOR3lJOGH78HHrS5XY9AjEq0meuE9RuQKfqGwVR1DH6ARWZ7MzBMP3TIQq7kS9Q0 HC9vFfbKYgDvClFxV9tVgFLdwdEhB6Yyd68/SXbZjol82aEeisjM4ijyXAQcKqWr5WPN xOUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=sh6ZfehXLaJ7xf8De4B54CxjZg1Ny7yY0hSdnd+MRLg=; b=Rz94Tb/o8rw0cLFBWlIcTLGDvnFLEdkpUO3ulkTXdEvb/XRh1fHmbF8znKSI7We7MA 9mPbBuJpPezvi1wOsDmXIcLHxSXQhtgo2zRn1q1bTJRs5qkmL+/cQusN9n8kbLUn2kJ/ pxAYCTJ/9jdghLj4Bv8mYkEOLLL8HJcwaC0+Be144FtFzlovndUL28C2YNJdPBxFhnTZ REVr4Gyb1xBrMe+rgAl1PTEcsXudaZ7/50/k+HK+PyNIMu7hv/b2OA6YK1NzXzLjCByu oDlWLm2ZezHgrYcYp6LpHrblcEPYN6bytCf8PpFNeRPxPMyWCMy0SqoqwsXnK6w3hIYC R0fQ== X-Gm-Message-State: AOAM5328GirL35vLxO9/ZvrN1/eYjn8BC96o3PF1P/DWfH/8It3piknn DAc8pMquKb6cuxwjqsPQnCGrz9Ve5qHXh4RJruw= X-Google-Smtp-Source: ABdhPJzaejM3Xr2VgbpqwhcXTx3LLy3/NKlDmbBKKHdJ4Aa/k7DMLgaddvUjcXNI+YON7v7n8g9Dfoc8j9MnEg9H5Dc= X-Received: by 2002:a17:903:124a:b0:154:c7a4:9375 with SMTP id u10-20020a170903124a00b00154c7a49375mr20734551plh.0.1652188751302; Tue, 10 May 2022 06:19:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Xiongwei Song Date: Tue, 10 May 2022 21:18:44 +0800 Message-ID: Subject: Re: squashfs performance regression and readahea To: Hsin-Yi Wang Cc: Matthew Wilcox , Zheng Liang , Phillip Lougher , Zhang Yi , Hou Tao , Miao Xie , Andrew Morton , Linus Torvalds , "Song, Xiongwei" , "linux-mm@kvack.org" , "squashfs-devel@lists.sourceforge.net" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 5703F40092 X-Stat-Signature: ep1um9rkt5hu6e8dm4caqfuazo31fojj X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Nn2Kn6HF; spf=pass (imf07.hostedemail.com: domain of sxwjean@gmail.com designates 209.85.214.182 as permitted sender) smtp.mailfrom=sxwjean@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam09 X-HE-Tag: 1652188746-606170 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, May 10, 2022 at 8:47 PM Hsin-Yi Wang wrote: > > On Tue, May 10, 2022 at 8:31 PM Xiongwei Song wrote: > > > > Hi Hsin-Yi, > > > > On Mon, May 9, 2022 at 10:29 PM Hsin-Yi Wang wrot= e: > > > > > > On Mon, May 9, 2022 at 9:21 PM Matthew Wilcox w= rote: > > > > > > > > On Mon, May 09, 2022 at 08:43:45PM +0800, Xiongwei Song wrote: > > > > > Hi Hsin-Yi and Matthew, > > > > > > > > > > With the patch from the attachment on linux 5.10, ran the command= as I > > > > > mentioned earlier, > > > > > got the results below: > > > > > 1:40.65 (1m + 40.65s) > > > > > 1:10.12 > > > > > 1:11.10 > > > > > 1:11.47 > > > > > 1:11.59 > > > > > 1:11.94 > > > > > 1:11.86 > > > > > 1:12.04 > > > > > 1:12.21 > > > > > 1:12.06 > > > > > > > > > > The performance has improved obviously, but compared to linux 4.1= 8, the > > > > > performance is not so good. > > > > > > > > I think you shouldn't compare the performance with 4.18 directly, > > > since there might be other factors that impact the performance. > > > > Make sense. > > > > >I'd suggest comparing the same kernel version with: > > > a) with this patch > > > b) with c1f6925e1091 ("mm: put readahead pages in cache earlier") rev= erted. > > > > With 9eec1d897139 ("squashfs: provide backing_dev_info in order to disa= ble > > read-ahead") reverted and applied 0001-WIP-squashfs-implement-readahead= .patch, > > test result on linux 5.18=EF=BC=9A > > 1:41.51 (1m + 41.51s) > > 1:08.11 > > 1:10.37 > > 1:11.17 > > 1:11.32 > > 1:11.59 > > 1:12.23 > > 1:12.08 > > 1:12.76 > > 1:12.51 > > > > performance worse 1 ~ 2s than linux 5.18 vanilla. > > > > Can you share the pack file you used for testing? Thanks You are saying the files that are put in squashfs partitions? If yes, I can= tell I just put some dynamic libraries in partitions: -rwxr-xr-x 1 root root 200680 Apr 20 03:57 ld-2.33.so lrwxrwxrwx 1 root root 10 Apr 20 03:57 ld-linux-x86-64.so.2 -> ld-2.33= .so -rwxr-xr-x 1 root root 18776 Apr 20 03:57 libanl-2.33.so lrwxrwxrwx 1 root root 14 Apr 20 03:57 libanl.so.1 -> libanl-2.33.so lrwxrwxrwx 1 root root 17 Apr 20 04:08 libblkid.so.1 -> libblkid.so.1.= 1.0 -rwxr-xr-x 1 root root 330776 Apr 20 04:08 libblkid.so.1.1.0 -rwxr-xr-x 1 root root 1823192 Apr 20 03:57 libc-2.33.so ...... snip ...... The number of files is 110(55 libs + 55 soft links to libs). I have 90 squ= ashfs partitions which save the identical files. The space of each partition is 1= 1M, nothing special. Thanks. > > > > > > According to https://lore.kernel.org/linux-mm/Ynfzh2ifG85MZEoN@casper= .infradead.org/t/ > > > It seems to be a 3 sec difference? > > > > 5 ~ 6s difference. > > > > Regards, > > Xiongwei > > > > > > > > 1:37.16 (1m + 37.16s) > > > 1:04.18 > > > 1:05.28 > > > 1:06.07 > > > 1:06.31 > > > 1:06.58 > > > 1:06.80 > > > 1:06.79 > > > 1:06.95 > > > 1:06.61 > > > > > > > > Moreover, I wanted to test on linux 5.18. But I think I should re= vert > > > > > 9eec1d897139 ("squashfs: provide backing_dev_info in order to dis= able > > > > > read-ahead"), > > > > > right? Otherwise, the patch doesn't work? > > > > > > > > I've never seen patch 9eec1d897139 before. If you're going to poin= t > > > > out bugs in my code, at least have the decency to cc me on it. It > > > > should never have gone in, and should be reverted so the problem ca= n > > > > be fixed properly.