From patchwork Wed Aug 14 20:20:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11094447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC4DA1399 for ; Wed, 14 Aug 2019 20:20:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD65928834 for ; Wed, 14 Aug 2019 20:20:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E5BB2883B; Wed, 14 Aug 2019 20:20:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32C5828834 for ; Wed, 14 Aug 2019 20:20:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5E0DE6B0007; Wed, 14 Aug 2019 16:20:36 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5911F6B0008; Wed, 14 Aug 2019 16:20:36 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 47F7D6B000A; Wed, 14 Aug 2019 16:20:36 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0104.hostedemail.com [216.40.44.104]) by kanga.kvack.org (Postfix) with ESMTP id 2071F6B0007 for ; Wed, 14 Aug 2019 16:20:36 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id B65DB3D12 for ; Wed, 14 Aug 2019 20:20:35 +0000 (UTC) X-FDA: 75822151230.21.toe50_52164d452614 X-HE-Tag: toe50_52164d452614 X-Filterd-Recvd-Size: 3902 Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Wed, 14 Aug 2019 20:20:35 +0000 (UTC) Received: by mail-ed1-f65.google.com with SMTP id s49so385160edb.1 for ; Wed, 14 Aug 2019 13:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nWZWsKOfmIl4yNVyC1A/XslquByM6vO1WGS7Kz0bD8U=; b=SVq5cWxfnMTCbnzjMxfAenRqPrywZHCY7aSYPqhjndhFoxhSpIaewsuAAbQ+hxRege LlE77zS9n3UHrI63NXV/R4kzhjhCsYIyspu6VzmOq3rB3oTT4FTYaoEIf2AXE4TNZw67 EpRfZR5Lx03CDLH2/rXob/8M+d0YAjVHOhE5s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nWZWsKOfmIl4yNVyC1A/XslquByM6vO1WGS7Kz0bD8U=; b=Qat97CHekUYpzYZJ5AkpazRuJDfOXtrwgAoCkVsEaVnIlYyPP1k6F8fA7C6OQN98dp Kp8nrgqgh4N0OvPjwa/5L8iCs6O5vg6Q4JyaQi/tz066GLF3adIZj8jhHdyQ3Az9UU84 SCpVQ6YoOuOxDCiEyAeexFfbXetdeidHVfDfqCoifmJaHbySgUSg2xqcIbzEySEq5faQ PedwyGhgr+zX+6HQBe+JXJvCIXg9Sgx457Pc8TdMHfeUY1rlXpyVFlAdjAM/ClY3nwYL DdVdZYOrAxhe+tqM4wtXOaX+3XJkskrWzEkOJ6/mgfWHsGH71hbN7cwdXVG9kZ5ORY5v OPTw== X-Gm-Message-State: APjAAAW6aPS38sk/IPyzBGNN4XFN/r57ULgpHOnxdfwF/5NMF1s5PeIG NntNlpI/kihb6U2rFqo1h+TUhg== X-Google-Smtp-Source: APXvYqw0SI+1ky3oT9vQxF5bI61NxCDkMXiJWr+jVakG6fqDm3c/lfxYyJWqP0bvugFJUIGMMW1jXQ== X-Received: by 2002:a17:906:5042:: with SMTP id e2mr1299846ejk.220.1565814033793; Wed, 14 Aug 2019 13:20:33 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id ns22sm84342ejb.9.2019.08.14.13.20.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2019 13:20:33 -0700 (PDT) From: Daniel Vetter To: LKML Cc: linux-mm@kvack.org, DRI Development , Intel Graphics Development , Daniel Vetter Subject: [PATCH 0/5] hmm & mmu_notifier debug/lockdep annotations Date: Wed, 14 Aug 2019 22:20:22 +0200 Message-Id: <20190814202027.18735-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 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: X-Virus-Scanned: ClamAV using ClamSMTP Hi all (but I guess mostly Jason), Finally gotten around to rebasing the previous version, fixing the rebase fail in there, update the commit message a bit and give this a spin with some tests. Nicely caught a lockdep splat that we're now discussing in i915, and seems to not have misfired anywhere else (including a few oom). Review, comments and everything very much appreciated. Plus I'd really like to land this, there's more hmm_mirror users in-flight, and I've seen some that get things wrong which this patchset should catch. Thanks, Daniel Daniel Vetter (5): mm: Check if mmu notifier callbacks are allowed to fail kernel.h: Add non_block_start/end() mm, notifier: Catch sleeping/blocking for !blockable mm, notifier: Add a lockdep map for invalidate_range_start mm/hmm: WARN on illegal ->sync_cpu_device_pagetables errors include/linux/kernel.h | 10 +++++++++- include/linux/mmu_notifier.h | 6 ++++++ include/linux/sched.h | 4 ++++ kernel/sched/core.c | 19 ++++++++++++++----- mm/hmm.c | 3 +++ mm/mmu_notifier.c | 17 ++++++++++++++++- 6 files changed, 52 insertions(+), 7 deletions(-)