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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 6E42DC433DB for ; Sun, 3 Jan 2021 22:32:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8556220776 for ; Sun, 3 Jan 2021 22:32:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8556220776 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 73C616B0036; Sun, 3 Jan 2021 17:32:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6EC5E6B0080; Sun, 3 Jan 2021 17:32:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 601706B0081; Sun, 3 Jan 2021 17:32:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0244.hostedemail.com [216.40.44.244]) by kanga.kvack.org (Postfix) with ESMTP id 4589F6B0036 for ; Sun, 3 Jan 2021 17:32:52 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 00CBA181AC9C6 for ; Sun, 3 Jan 2021 22:32:51 +0000 (UTC) X-FDA: 77665914984.02.bee66_3e10b10274cb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id DAD9010097AA0 for ; Sun, 3 Jan 2021 22:32:51 +0000 (UTC) X-HE-Tag: bee66_3e10b10274cb X-Filterd-Recvd-Size: 5377 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Sun, 3 Jan 2021 22:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=Pq+5Z6ozvBaQ5iA++kASTFfnI1AQK5+3BrIASqR75x4=; b=lWEr/RahzQuRqv+Y6uMeYoNOsc PZH+y1eOiRJ5/96iK7tIFKwvyqYxCOlwEGocSIZ84eZiEN1LtBxkb+7+Jpuwd6UsjXMXoSGot4P8R le2InaegxJPb6xC0gIy0fpZJeW7aluHkgHKSG07VmmE6Pwgk5KIE8UKVU17JPnHOvxeXlcu7gCvoo 3fBlV8tAOWMNnMqb82niB2LKagYKfi6y65dcPOsjCJRJfF0We/9uddMNNM5pZPnUm1iwZGoiMDZbz BA09yeWOVbFDmuhf1G8WMNBqok2iJfa1XqOo1PvjEmZbVgDiMALjWr0Qtv8oordqSt7uxuKPeW27R JVs0Tv4g==; Received: from [2601:1c0:6280:3f0::2c43] by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1kwBvT-000QEX-59; Sun, 03 Jan 2021 22:32:45 +0000 Subject: Re: [PATCH -mm] mm: readahead: apply a default readahead size To: =?UTF-8?Q?Toralf_F=c3=b6rster?= , Matthew Wilcox Cc: linux-kernel@vger.kernel.org, Andrew Morton , Jens Axboe , linux-mm@kvack.org References: <20201229212634.31307-1-rdunlap@infradead.org> <20201229222311.GD28221@casper.infradead.org> <361416d6-756d-e652-224d-03b56934030a@gmx.de> From: Randy Dunlap Message-ID: Date: Sun, 3 Jan 2021 14:32:34 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable 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 1/3/21 1:40 PM, Toralf F=C3=B6rster wrote: > On 12/30/20 10:05 AM, Toralf F=C3=B6rster wrote: >> On 12/29/20 11:55 PM, Randy Dunlap wrote: >>>> No, this is wrong.=C2=A0 'size' in this case is the size of the read= . >>>> And it's zero.=C2=A0 Is this fixed by commit >>>> 3644e2d2dda78e21edd8f5415b6d7ab03f5f54f3 >>>> >>> Toralf, can you test with 5.11-rc1 (or later)? >>> >>> thanks. >> >> My plan was to apply that commit on top of the upcoming 5.10.4 and tes= t >> that, just waiting in moment for Greg to release the stable version. >> > I commit 3644e2d2dda on top of 5.10.4 at my server - no issue so far. I > did NOT patched my desktop (same stable hardened Gentoo Linux, same > software and kernel versions) - and there it happened under 5.10.4 too: >=20 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494365] UBSAN: shift-out-of-bo= unds > in ./include/linux/log2.h:57:13 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494371] shift exponent 64 is t= oo > large for 64-bit type 'long unsigned int' > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494378] CPU: 0 PID: 16651 Comm= : cc1 > Tainted: G=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 W=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 T 5.10.4 #5 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494381] Hardware name: LENOVO > 20AQCTO1WW/20AQCTO1WW, BIOS GJETA4WW (2.54 ) 03/27/2020 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494383] Call Trace: > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494397]=C2=A0 dump_stack+0x57/= 0x6a > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494402]=C2=A0 ubsan_epilogue+0= x5/0x40 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494408] > __ubsan_handle_shift_out_of_bounds.cold+0x61/0x10e > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494419] > ondemand_readahead.cold+0x16/0x21 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494427] > generic_file_buffered_read+0x43d/0x880 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494437]=C2=A0 new_sync_read+0x= 15d/0x1f0 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494442]=C2=A0 vfs_read+0xf5/0x= 190 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494447]=C2=A0 ksys_read+0x65/0= xe0 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494453]=C2=A0 do_syscall_64+0x= 33/0x40 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494460] > entry_SYSCALL_64_after_hwframe+0x44/0xa9 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494466] RIP: 0033:0x7feace476d= fe > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494472] Code: c0 e9 c6 fe ff f= f 50 > 48 8d 3d de d6 09 00 e8 89 e4 01 00 66 0f 1f 84 00 00 00 00 00 64 8b 04 > 25 18 00 00 00 85 c0 75 14 0f 05 <48> 3d 00 f0 ff ff 77 5a c3 66 0f 1f > 84 00 00 00 00 00 48 83 ec 28 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494476] RSP: 002b:00007ffe122f= 4318 > EFLAGS: 00000246 ORIG_RAX: 0000000000000000 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494483] RAX: ffffffffffffffda = RBX: > 0000000000000000 RCX: 00007feace476dfe > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494486] RDX: 0000000000000000 = RSI: > 00000000047971a0 RDI: 0000000000000008 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494489] RBP: 00000000047ba600 = R08: > 00000000047971a0 R09: 000000000470d010 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494492] R10: 00007feace543a00 = R11: > 0000000000000246 R12: 0000000004721610 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494495] R13: 00000000047971a0 = R14: > 0000000000000000 R15: 0000000000000000 > Jan=C2=A0 3 20:54:59 t44 kernel: [126159.494499] > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D OK, thanks for testing that commit and letting us know. --=20 ~Randy