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: 11094449 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 524311395 for ; Wed, 14 Aug 2019 20:20:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E08028837 for ; Wed, 14 Aug 2019 20:20:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30D9028834; Wed, 14 Aug 2019 20:20:39 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E025D28834 for ; Wed, 14 Aug 2019 20:20:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9841E6E82C; Wed, 14 Aug 2019 20:20:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4EF536E82D for ; Wed, 14 Aug 2019 20:20:35 +0000 (UTC) Received: by mail-ed1-x541.google.com with SMTP id r12so363768edo.5 for ; Wed, 14 Aug 2019 13:20:35 -0700 (PDT) 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=ii3UB+o0Q2usWvpn4gu8Aa8tyiCEP+wYnIMgDjx3uHCz3sAQL+lTVvogNuFyb6wwPy GvMF2Vx4HohXP79mM0Q8hIXNq4jxhb5gB8ESbM3S2NRKjHrTTtUl029tFvNc96D0gbGn Uqjd2XTkbXwfgytDUYyv9wGFBb97BSvzvjcfB1DLvf3ZNu+SfN4BqWshZaaoDLQ36Nkc uQHkEOlHzoM8TwF0m5UpT5oCTlBRc0sKSRueyT5qQxBv/M/g9BpWbZJQ8qz5Mmq1r8WD nFjvyFmA7ID/eL0R3E3rC3/ZDZUac1nPLyRXsaAUUU8StGIWQwNLqEqPFyk3s0ssBbhY BegQ== X-Gm-Message-State: APjAAAWE5zYjjAx+zgJXGTOL49jMPOHNeMarpbaysXKAOqfJI/bx7Gnv sbsNriAdahFj0jHQoF+bPCem0A== 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 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-Mailman-Original-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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mm@kvack.org, Intel Graphics Development , DRI Development , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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(-)