From patchwork Wed Aug 14 20:20:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11094467 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 BAA2E1395 for ; Wed, 14 Aug 2019 20:20:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA1DB28800 for ; Wed, 14 Aug 2019 20:20:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E07828837; Wed, 14 Aug 2019 20:20:48 +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 2A04628800 for ; Wed, 14 Aug 2019 20:20:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D16176B000E; Wed, 14 Aug 2019 16:20:42 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BD9556B0010; Wed, 14 Aug 2019 16:20:42 -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 A4CF56B0266; Wed, 14 Aug 2019 16:20:42 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0221.hostedemail.com [216.40.44.221]) by kanga.kvack.org (Postfix) with ESMTP id 81CF76B000E for ; Wed, 14 Aug 2019 16:20:42 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 26D098248AA2 for ; Wed, 14 Aug 2019 20:20:42 +0000 (UTC) X-FDA: 75822151524.06.books64_613a28a9c808 X-HE-Tag: books64_613a28a9c808 X-Filterd-Recvd-Size: 4679 Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Wed, 14 Aug 2019 20:20:41 +0000 (UTC) Received: by mail-ed1-f65.google.com with SMTP id w5so348688edl.8 for ; Wed, 14 Aug 2019 13:20:41 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=8YdsxBm4SorcCs6LR7QkyWK07j5ac679kdHnkcCO8NA=; b=SElBQSnY/MEpHH8627z9LUJO0AwXfwMVSdTTj8+/meirzqVOVaUQig461Ql4grU9BW AVOrqu2gy8FVObWFxEJFZZI9KGDQ9zAPfmV41ZLckaSp17XA9+mEmzFQIBhzh/7c6swP BOywaRmA/1lgbIGeuvAe+e1TOiq/MWLuxLS1U= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=8YdsxBm4SorcCs6LR7QkyWK07j5ac679kdHnkcCO8NA=; b=k7Cmj4G7jmjCWzFT69MM8IY6S4AmYEL/UYboR7oiaKIs/3Q3h+O4O58+8cwPWC3G2i sdLh/6FaPQ+CGoNxXgYE7sD+g6Pb+avLrt/jcTKXDzmswwl0tNkLP9kjyaoQaKU825fy TMivey+HUZy2Uyqd/cdGa/yIu7Z9gBXc3wB7pZota5TLmUAFXvwOMo5qXVXZvjHaX79r SuaUJh8dkXH0HcLPBdTqz43dwW+m6E1z2aHAJRQOBwJja1ZwnqeSiXXqAn0vYX9vB8n4 dBdV6ax5aARLBzfujimPmLF+Artk5sUw9Q8f3Mml/LsqPcj9nivWVhZCbg/YnvKSiKs1 jejQ== X-Gm-Message-State: APjAAAVGIdjQFlMPBCM91PeJRymEHU8kgxOFWUASPuIVKWMyUI4hu/b9 nWi1KfoDNeK/qzAYF3sqj1gLfg== X-Google-Smtp-Source: APXvYqyP95CvDgYSo4eGFz7IoA7gCAiTTQNCbZZ85IgUxdxzhynRxhcbBwMwFB/O5KsYTtdIbvM0uQ== X-Received: by 2002:aa7:d285:: with SMTP id w5mr1658562edq.134.1565814040425; Wed, 14 Aug 2019 13:20:40 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2019 13:20:39 -0700 (PDT) From: Daniel Vetter To: LKML Cc: linux-mm@kvack.org, DRI Development , Intel Graphics Development , Daniel Vetter , Jason Gunthorpe , Ralph Campbell , John Hubbard , Dan Williams , Dan Carpenter , Matthew Wilcox , Arnd Bergmann , Balbir Singh , Ira Weiny , Souptick Joarder , Andrew Morton , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Daniel Vetter Subject: [PATCH 5/5] mm/hmm: WARN on illegal ->sync_cpu_device_pagetables errors Date: Wed, 14 Aug 2019 22:20:27 +0200 Message-Id: <20190814202027.18735-6-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814202027.18735-1-daniel.vetter@ffwll.ch> References: <20190814202027.18735-1-daniel.vetter@ffwll.ch> 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 Similar to the warning in the mmu notifer, warning if an hmm mirror callback gets it's blocking vs. nonblocking handling wrong, or if it fails with anything else than -EAGAIN. Cc: Jason Gunthorpe Cc: Ralph Campbell Cc: John Hubbard Cc: Dan Williams Cc: Dan Carpenter Cc: Matthew Wilcox Cc: Arnd Bergmann Cc: Balbir Singh Cc: Ira Weiny Cc: Souptick Joarder Cc: Andrew Morton Cc: "Jérôme Glisse" Cc: linux-mm@kvack.org Signed-off-by: Daniel Vetter Reviewed-by: Daniel Vetter --- mm/hmm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/hmm.c b/mm/hmm.c index 16b6731a34db..52ac59384268 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -205,6 +205,9 @@ static int hmm_invalidate_range_start(struct mmu_notifier *mn, ret = -EAGAIN; break; } + WARN(ret, "%pS callback failed with %d in %sblockable context\n", + mirror->ops->sync_cpu_device_pagetables, ret, + update.blockable ? "" : "non-"); } up_read(&hmm->mirrors_sem);