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 2A673C433F5 for ; Wed, 16 Feb 2022 19:04:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 71FBE6B0074; Wed, 16 Feb 2022 14:04:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6CE846B0075; Wed, 16 Feb 2022 14:04:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 596D96B0078; Wed, 16 Feb 2022 14:04:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0211.hostedemail.com [216.40.44.211]) by kanga.kvack.org (Postfix) with ESMTP id 4B68A6B0074 for ; Wed, 16 Feb 2022 14:04:49 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 09FB98A9BA for ; Wed, 16 Feb 2022 19:04:49 +0000 (UTC) X-FDA: 79149569898.23.81FC00D Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by imf16.hostedemail.com (Postfix) with ESMTP id 68032180016 for ; Wed, 16 Feb 2022 19:04:48 +0000 (UTC) Received: by mail-lf1-f51.google.com with SMTP id j7so5638528lfu.6 for ; Wed, 16 Feb 2022 11:04:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MFZAXh0fPBQNBK2R2nIbUxsfdyleJj0WxyfRkLW2ksM=; b=Uluo3RZ4Jb1a8toBJUYIYiZsZX8M8bZSJueR1LtDSK2/kjqFPZc2c843qGVD0412tE SFliv6hazTgZT8N6TuzuCzJcyQvHI2dObibM/hIL7m+6gPVsOUzZllXCXv/NKfiUW3He mdLeagIMwN9s9JKPFRvkLtupmK75oAPH2rWXU= 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; bh=MFZAXh0fPBQNBK2R2nIbUxsfdyleJj0WxyfRkLW2ksM=; b=XcrklGenHMz7njcz0VUfthjMxJECBzOoKkp6EH1m1HPeHYYAfWhIY9z19mfS4noHJa EEKq3CQYyaDId3dZG9FJyI8Et3Xv1lFKeGJ1vSXTlJXffxx5kN5S7fHnaw4iyydT59jb EFaBjUnmLSgDX8r5efeGcQWrg9f9qs3z58JppfuIzaKT6ZilxG1fcUwgVcP8p15qNw48 HE/O59UjZ4OeyYfgQGsPoem7CNWMingFRbvWPG+OWz+73hV/DBKs2lpTXy5rr8Ch01I6 lGpqCfKzeBnuaBpLbTDTZmgmarGRHUzz9grveIL5/rcD2lZTn1bYbMBI/NQMKODz2081 SzEg== X-Gm-Message-State: AOAM530CVblDPeOxW4sQhHtZ6TM7ZBm3uyYnrGPMarNyTkapY0N2OewS oypcIQTC+pb4ZA8MDw9SzH3KcHSSHB1DesMYPOg= X-Google-Smtp-Source: ABdhPJysm2fgmilC5m3YY93Ct5A3OM/J2PNskzSvTUt/uoeN2iQnWuFuchFJk3qgx7ZJAgTbXGL6Rw== X-Received: by 2002:ac2:4e0b:0:b0:443:3cba:2200 with SMTP id e11-20020ac24e0b000000b004433cba2200mr2824980lfr.572.1645038286565; Wed, 16 Feb 2022 11:04:46 -0800 (PST) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com. [209.85.208.179]) by smtp.gmail.com with ESMTPSA id w17sm4924768lfa.33.2022.02.16.11.04.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Feb 2022 11:04:45 -0800 (PST) Received: by mail-lj1-f179.google.com with SMTP id c10so4783904ljr.9 for ; Wed, 16 Feb 2022 11:04:44 -0800 (PST) X-Received: by 2002:a05:651c:549:b0:243:d87d:4f5a with SMTP id q9-20020a05651c054900b00243d87d4f5amr3232911ljp.443.1645038284648; Wed, 16 Feb 2022 11:04:44 -0800 (PST) MIME-Version: 1.0 References: <20200917112538.GD8409@ziepe.ca> <20200917193824.GL8409@ziepe.ca> <20200918164032.GA5962@xz-x1> <20200918173240.GY8409@ziepe.ca> <20200918204048.GC5962@xz-x1> <0af8c77e-ff60-cada-7d22-c7cfcf859b19@nvidia.com> <20200919000153.GZ8409@ziepe.ca> <20200921083505.GA5862@quack2.suse.cz> <20200921120301.GD8409@ziepe.ca> In-Reply-To: From: Linus Torvalds Date: Wed, 16 Feb 2022 11:04:28 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] mm: Trial do_wp_page() simplification To: Oded Gabbay , David Hildenbrand Cc: Jason Gunthorpe , Jan Kara , John Hubbard , Leon Romanovsky , Linux-MM , Linux Kernel Mailing List , "Maya B . Gokhale" , Yang Shi , Marty Mcfadden , Kirill Shutemov , Oleg Nesterov , Jann Horn , Kirill Tkhai , Andrea Arcangeli , Christoph Hellwig , Andrew Morton , Daniel Vetter , Greg Kroah-Hartman , Peter Xu Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 68032180016 X-Stat-Signature: cbpsg5zqt6euu4fgu1h1i7udq178knxc Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=Uluo3RZ4; spf=pass (imf16.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.51 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-HE-Tag: 1645038288-873690 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: [ Added David Hildenbrand to the participants. David, see https://bugzilla.kernel.org/show_bug.cgi?id=215616 for details ] On Wed, Feb 16, 2022 at 8:59 AM Oded Gabbay wrote: > > All the details are in the bug, but the bottom line is that somehow, > this patch causes corruption when the numa balancing feature is > enabled AND we don't use process affinity AND we use GUP to pin pages > so our accelerator can DMA to/from system memory. Hmm. I thought all the remaining issues were related to THP - and David Hildenbrand had a series to fix those up. The fact that it also shows up with numa balancing is a bit unfortunate, because I think that means that that patch series may not have caught that case. That said - what does "we use GUP to pin pages" mean? Does it actually use the pinning logic, or just regular old GUP? I'm assuming this is just the existing pin_user_pages_fast() (ie a proper pin) in drivers/misc/habanalabs/common/memory.c. But I wanted to confirm that it's not some other situation. Linus