Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3212395imu; Sat, 24 Nov 2018 00:13:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/U3ssii5JUwHEVRr0Y+XgNZtsk6eilJ1phyhOEXvCf3iE6SO5y9cxHuLlQZbFARTfnfMHkQ X-Received: by 2002:a63:a401:: with SMTP id c1mr17146036pgf.403.1543047203713; Sat, 24 Nov 2018 00:13:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543047203; cv=none; d=google.com; s=arc-20160816; b=AEyop66V/JL0Z9WZaUOL82ygh8H78kK85zKOiPN9PlmMEb5hu85Q5PHCzseCPh2rZh eoDPVVjpjre7f1zXQ7SWvejmX5tHTUTzo73SmQ3UZCYbirZvDmoBTW+8BRisfeT8O0yG bWpuZC3em6Wv4qLDkC01XXSl+Of54WnTFkcjIJATk7WaU4/hkgA9Q9B8Z4JjOGn7Gdz2 Lmh9aji+TlJGK+o6tWloA0BwwUP9t07xRfm5OVRVAIZeYfSGEGHhk0zHVlQhSoucFuNn bjE79RQc2kQNxN7ri/R51ANZSsMs5EYjFvE5YyLxCQJn56rfiZ8CCe4rXo7XsZUA+vTR 6u5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=QBKPVV0ShgVR63w55Mb7QhxH7Aq7rLQZiK95d74RRXE=; b=1F3aEp9TQXhZ3NOqfqFTxGKw1pTEZP69XNycge0IgQhyq2xtJCZK318uYW/9gYd+EX PH8FEposp47mXzp8Z2RV3IGLQOiiZ7ltsWurpCJQUvYgTCPmUKqcV+3rup3cietEIK9W 2fSKfzvwf+XIGbkmUYYOMOR0ciEk7cedIB/2x3lkiNRvXRrNzzZLM9y+CEg5Gn3IeZl0 bNj93lILHZM91v1ihu+HFWcSPS23779wexoZ7fko75YSFi8nFAEk9PeKBQP0bBpieVSi b2MsSSZ7HEmXIHHVbgA+avotNUKwssw2T6FPdjxNEhmRLkKrgyNtHQAJAo817FKOgHG4 eqUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=dXagLtVc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h19si37812030plr.67.2018.11.24.00.13.09; Sat, 24 Nov 2018 00:13:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=dXagLtVc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408727AbeKWTc5 (ORCPT + 99 others); Fri, 23 Nov 2018 14:32:57 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:46047 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387605AbeKWTc4 (ORCPT ); Fri, 23 Nov 2018 14:32:56 -0500 Received: by mail-ed1-f68.google.com with SMTP id d39so9595849edb.12 for ; Fri, 23 Nov 2018 00:49:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=QBKPVV0ShgVR63w55Mb7QhxH7Aq7rLQZiK95d74RRXE=; b=dXagLtVcnx3O7MV6pkD3pBq1jVK6tWqCMOtpHGetdpuX9iPXXJHXBATYjp8A2LV7pW E0q37Idw5MUBFXToeSAtIKuCkpO5Vj+8l8EeGYU0BFGrMBDBGDZoD9b7ML50JJyfsKbT GVtIP/XDKGlMLTTLBAcRDHr1wbWGw9uOYgAy0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=QBKPVV0ShgVR63w55Mb7QhxH7Aq7rLQZiK95d74RRXE=; b=E61EHmQLVoPxKiP+TIgELw/bA9u/cfurhNTISyM8ydvRj+67D50hWlPAIA2qafzvBS lhS1fq5QmeLych9lq85TwPCMadwfc1GeJcaee1vu/wmyU5AuOMAk/y/mMr0TLRnsOd3f drfluv+7apJidWkhXnaZNNvRKhvLiTVGTRmxq94JLCrg2LWf1JttE6DarKgwcQW+vZmv C7c+O1OTu+f06c4vh9b8TbzkKRKlgJkgSbKJFgb2RA4s0ix6zdAVZb/KSY5tnLS3JBmQ U0ykP5AK/W3BbHpHYgAkBAZREs09uRzYMhP6m2N/3/Mm/N3uYaqobi8zwyRwjuKOSnIu M4Ow== X-Gm-Message-State: AA+aEWY1mLZQVsDdy36uexwKna03iGdw6JYJXjt6KTWaLCxnfOmc3xXx wLSk1SgmTBwDAkyvGmcWWe0LUQ== X-Received: by 2002:a50:af65:: with SMTP id g92-v6mr12435394edd.274.1542962977683; Fri, 23 Nov 2018 00:49:37 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id g31sm7271531eda.96.2018.11.23.00.49.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Nov 2018 00:49:36 -0800 (PST) Date: Fri, 23 Nov 2018 09:49:34 +0100 From: Daniel Vetter To: Chris Wilson Cc: Daniel Vetter , LKML , Michal Hocko , Daniel Vetter , Intel Graphics Development , DRI Development , Linux MM , =?iso-8859-1?B?Suly9G1l?= Glisse , David Rientjes , Paolo Bonzini , Andrew Morton , Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: [Intel-gfx] [PATCH 1/3] mm: Check if mmu notifier callbacks are allowed to fail Message-ID: <20181123084934.GI4266@phenom.ffwll.local> Mail-Followup-To: Chris Wilson , LKML , Michal Hocko , Daniel Vetter , Intel Graphics Development , DRI Development , Linux MM , =?iso-8859-1?B?Suly9G1l?= Glisse , David Rientjes , Paolo Bonzini , Andrew Morton , Christian =?iso-8859-1?Q?K=F6nig?= References: <20181122165106.18238-1-daniel.vetter@ffwll.ch> <20181122165106.18238-2-daniel.vetter@ffwll.ch> <154290561362.11623.15299444358726283678@skylake-alporthouse-com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <154290561362.11623.15299444358726283678@skylake-alporthouse-com> X-Operating-System: Linux phenom 4.18.0-2-amd64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 22, 2018 at 04:53:34PM +0000, Chris Wilson wrote: > Quoting Daniel Vetter (2018-11-22 16:51:04) > > Just a bit of paranoia, since if we start pushing this deep into > > callchains it's hard to spot all places where an mmu notifier > > implementation might fail when it's not allowed to. > > Most callers could handle the failure correctly. It looks like the > failure was not propagated for convenience. I have no idea whether the mm is semantically ok if pte shootdown doesn't work for all sorts of strange reasons. From the commit that introduced the error code it souded like this was very much only ok in the limited case of an already killed process, in the oom killer path, where it's really only about trying to free any kind of memory. And where the process is gone already, so semantics of what exactly happens don't matter that much anymore. And even if a lot more paths could support some kind of error recovery (they'd need to restart stuff, at least for your i915 patch to work I think), as long as we have paths where that's not allowed I think it's good to catch any bugs where a nonzero errno is errornously returned. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch