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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS 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 D5FA7C433ED for ; Tue, 20 Apr 2021 18:33:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 97461613B2 for ; Tue, 20 Apr 2021 18:33:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97461613B2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mpi-sws.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DC3C16B006C; Tue, 20 Apr 2021 14:33:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D74126B006E; Tue, 20 Apr 2021 14:33:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C14AD6B0070; Tue, 20 Apr 2021 14:33:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0004.hostedemail.com [216.40.44.4]) by kanga.kvack.org (Postfix) with ESMTP id A22296B006C for ; Tue, 20 Apr 2021 14:33:10 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 616CD4DA8 for ; Tue, 20 Apr 2021 18:33:10 +0000 (UTC) X-FDA: 78053592540.18.B96A77B Received: from juno.mpi-klsb.mpg.de (juno.mpi-klsb.mpg.de [139.19.86.40]) by imf18.hostedemail.com (Postfix) with ESMTP id 23D3E2000272 for ; Tue, 20 Apr 2021 18:33:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mpi-sws.org ; s=mail201904; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To :References:MIME-Version:sender:reply-to:content-transfer-encoding:content-id :content-description:resent-date:resent-from:resent-sender:resent-to: resent-cc:resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe :list-post:list-owner:list-archive; bh=g2jlxKHIBvBTaG7Oz0HblTa1g9KU9Gdqmy/kiJ+z9eI=; b=acNiI1fH0xfk05zbpdxnqgZkOK eiL2D9OCOXMqR4Z0v51kaWxVjhGWq1tg6ozIG/B7McT9Rxh8+jHBRveP01NzUXbJaSI6vWuQ4zA9l L+glEnyKh0nECTP8TEEe1JcZbMkA4Qy2mWQCtTZOjljEsOKQ7QPDzPD/4xPpOEbXf4eg=; Received: from max.mpi-klsb.mpg.de ([139.19.86.27]:44878) by juno.mpi-klsb.mpg.de (envelope-from ) with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) id 1lYvBH-0003aX-8c for linux-mm@kvack.org; Tue, 20 Apr 2021 20:33:07 +0200 Received: from mail-ot1-f51.google.com ([209.85.210.51]:42817) by max.mpi-klsb.mpg.de (envelope-from ) with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) id 1lYvBG-0008SV-U5 for linux-mm@kvack.org; Tue, 20 Apr 2021 20:33:03 +0200 Received: by mail-ot1-f51.google.com with SMTP id y14-20020a056830208eb02902a1c9fa4c64so173781otq.9 for ; Tue, 20 Apr 2021 11:33:02 -0700 (PDT) X-Gm-Message-State: AOAM531YqqY6p1V/8MxuSG6VYdpQ7POGcfG/yNEEUqE4tYL/rormh1pB Esg6KY2w2zufoksH1ozwawUqIBq7qPGc8T9WLFc= X-Google-Smtp-Source: ABdhPJzRxCpNC+XJ8hiKvR2kR/sQdtm0L80OWMXdeTol3xKnsr6q9EmyUMr8jtr+ftsGSOQb71spw16I1/I/+zj8uLE= X-Received: by 2002:a9d:da4:: with SMTP id 33mr20061192ots.176.1618943581352; Tue, 20 Apr 2021 11:33:01 -0700 (PDT) MIME-Version: 1.0 References: <2e60ad6d-7bdf-e19e-4ad9-6942f76088d3@suse.cz> <20201130120241.GP3040@hirez.programming.kicks-ass.net> <20201130125045.GG24563@willie-the-truck> In-Reply-To: <20201130125045.GG24563@willie-the-truck> From: Mohamed Alzayat Date: Tue, 20 Apr 2021 20:32:50 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Potential bug in soft-dirty bits (with test case) To: Will Deacon Cc: Peter Zijlstra , Vlastimil Babka , "Aneesh Kumar K.V" , linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" X-RSPAMD-Score: -0.3 (/) X-RSPAMD-Report: Action: no action Symbol: RCVD_VIA_SMTP_AUTH(0.00) Symbol: ARC_NA(0.00) Symbol: FROM_HAS_DN(0.00) Symbol: TO_DN_SOME(0.00) Symbol: R_SPF_ALLOW(-0.20) Symbol: MIME_GOOD(-0.10) Symbol: PREVIOUSLY_DELIVERED(0.00) Symbol: DMARC_NA(0.00) Symbol: RCPT_COUNT_FIVE(0.00) Symbol: RCVD_COUNT_THREE(0.00) Symbol: TO_MATCH_ENVRCPT_SOME(0.00) Symbol: RCVD_IN_DNSWL_NONE(0.00) Symbol: NEURAL_HAM(-0.00) Symbol: FROM_EQ_ENVFROM(0.00) Symbol: R_DKIM_NA(0.00) Symbol: MIME_TRACE(0.00) Symbol: ASN(0.00) Symbol: RCVD_TLS_ALL(0.00) Message-ID: CA+32v5wi7QbY6p+BbLkNz9mgdUbi71zwFmq5o6TMw2XDXrhogA@mail.gmail.com X-Stat-Signature: 1euisk5w3yck8bcchd4amgj9b7xw6f5h X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 23D3E2000272 Received-SPF: none (mpi-sws.org>: No applicable sender policy available) receiver=imf18; identity=mailfrom; envelope-from=""; helo=juno.mpi-klsb.mpg.de; client-ip=139.19.86.40 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618943591-576053 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: Thanks a lot Vlastimil, and Peter for the pointers! Many thanks Will for actually fixing it (v5.12)! Thanks, Mohamed On Mon, Nov 30, 2020 at 1:50 PM Will Deacon wrote: > > On Mon, Nov 30, 2020 at 01:02:41PM +0100, Peter Zijlstra wrote: > > On Mon, Nov 30, 2020 at 12:51:59PM +0100, Vlastimil Babka wrote: > > > On 11/30/20 11:37 AM, Mohamed Alzayat wrote: > > > > > > Thanks for confirming, Vlastimil! > > > > > > > > The first bad commit is: 0758cd8304942292e95a0f750c374533db378b32 > > > > asm-generic/tlb: avoid potential double flush > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0758cd8304942292e95a0f750c374533db378b32 > > > > > > > > Reverting this commit solves the problem, but this might not be the > > > > right way of fixing it. > > > > > > Thanks for bisecting! Let's CC people involved in that commit. All important > > > should be in the quoted conversation above. > > > > There's a thread about it here: > > > > https://lkml.kernel.org/r/20201120143557.6715-1-will@kernel.org > > > > That softdirty code really shouldn't be using mmu_gather imo, but I'm > > still not clear on what exactly is broken why there. > > I'll spin a v2 of that series soon, so I'll add folks here to cc. The > fact that a test noticed the missing invalidation is a pretty good reason > for us to add it back! Thanks, everyone! I appreciate your helpful comments and pointers, looking forward to the v2 of that series. Until then, reverting to double TLB flush works fine on recent kernels (tested on v5.10-rc5). Thanks, Mohamed > > Will >