Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1424380ybl; Wed, 14 Aug 2019 17:04:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqy17gh16xKbwEDoRYLuMBIRMw5ySTNkA/oeaBb8MUWqFDiMDeG/zj55SrAV3PY7OhZIM6zA X-Received: by 2002:a63:3c5:: with SMTP id 188mr1362877pgd.394.1565827475766; Wed, 14 Aug 2019 17:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565827475; cv=none; d=google.com; s=arc-20160816; b=qazwKIn1MY1/W29hcseESVU6qqMLwHNG9khSI7qoSY+g4R710QNn6XbGdM3aFvLefL UqTDC6egop2YXdRSh+hn7uFHB8cq1m0+ayNnAeF9Co3zo73GnpNp48pvtwSMsUQe9dy/ VOk0tMfjDqARqFxZGOKu2WpqvSFntacuwdrdIotMCd6fNRX4zR+VQRVYGh2kS0a9hM1N ey3p72P8haJ/sPVO9Frvpeqjm3ZaMTDqP85qvSfRYZLV5IlYUH/7nNMPAOmDh6bCRVq7 lwcCpfIFcAa/cEVSjloWEK1SgMpVMrmosc4pBudNzSj3vA+MizYDLpTTOC/gjYADBoLN uiUw== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=uQcEycbJpYwq03WKUHr1Col8h+hbyHngyQSZBqVtuao=; b=zxI+hE0jBxrXd0XLvBUoWw/p8ZG6RR5XCVdxOKPiIYNKg02EP/BVo6enECohFWBqQP 5kx0FcMwxUqqNmL8iJOKBozxyAFlWObrKrM5d1uVJBdh+6KLv5NqSXccplG2cihzPDZs 9Qc9D9XoAMp80h09TiUhzysDDipTsFeO7/+jLL26SA+CniKNHpDd2aEzk9I+M7T+AZb6 t/D/IrGvbFIANtzl6CVNJFlKUnGUBegFNfC3Ba4PGm/JwwAjHwzVQKeq89cUkiy57hXZ v9O0lEXhNx54bxvYNH6TdXFmBzoKUTmE5dho20QkTAg83zeswpUF5VOK2gA4B8IF+jQx eV+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=WqnDtaZO; 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 o12si176922pjp.72.2019.08.14.17.04.19; Wed, 14 Aug 2019 17:04:35 -0700 (PDT) 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=pass header.i=@ziepe.ca header.s=google header.b=WqnDtaZO; 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 S1728500AbfHOAAc (ORCPT + 99 others); Wed, 14 Aug 2019 20:00:32 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:42238 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbfHOAAb (ORCPT ); Wed, 14 Aug 2019 20:00:31 -0400 Received: by mail-qt1-f194.google.com with SMTP id t12so604977qtp.9 for ; Wed, 14 Aug 2019 17:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uQcEycbJpYwq03WKUHr1Col8h+hbyHngyQSZBqVtuao=; b=WqnDtaZOeGzmOCMQPC4We4PRD3RuiO/IALjyCYVZuuWQ7X8TuNS1arQXC7EG5H/WMM QoTLuRO+le+M6rRKQ+g/kpY4oRBlm26psPwlaph+NfO/QHkvqy5y7xLVn5asu5icHcX8 4+cgO8/3DW0QOxaqqU3N1R3jkqcGn2CA/nu/llYZ7KTrYBM7rhgO5bNv15Mwl/qhHkFr xLgkDtM4ecYPJZGJaT+5ygz3Mtzt1oLeN40DNq1h3PCmx2kj0py9uxQtJ3zyBZMMMiMa 2sMtpruVKWC3ihvALp2SoFVQLWI2B85dMUSqBzp9DgYpURT4u2F3Usbhyj4KoRDhvXLf XwZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uQcEycbJpYwq03WKUHr1Col8h+hbyHngyQSZBqVtuao=; b=L5fq2OaiKYswCjQMovvv9kqisKuKoGeekt1YfPseiZfE34H9ojD70D6HbO8WeibXHR SjrCSQJLbeH3U9msBk7MMLjboHXwOQ3mO8Fp7km0I6G9Ylgo1bsA+x93TAh0rDRFxo9p jdXmydIUvZwBnJmfDPfz8E1zf9EBRD2alJ5aYOY2bS0ZZfppRhp7fHMNZrOEd9nmlTl+ Yea36RV509BRIvpFjPy4UTZtOcbaqraHTrVyBEm7Egou5OuiQHp9HL8LpEk46nqmHxjW uPzti1SOaDnMY6RLjmLrJ1+N5DVEzq0agU1Wta/g6Qm+jLbn1ka7B8CDHL2kMOGDQpb7 EbzQ== X-Gm-Message-State: APjAAAVrsem6GB3xdIOU871iQpAmCjp8AD0hokJw8EIsA/rDP+J+yHJ5 zF/1gscnkeNHe9baNn6SEv6sqg== X-Received: by 2002:ac8:5315:: with SMTP id t21mr1735710qtn.66.1565827231022; Wed, 14 Aug 2019 17:00:31 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-55-100.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.55.100]) by smtp.gmail.com with ESMTPSA id u126sm637456qkf.132.2019.08.14.17.00.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2019 17:00:30 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1hy3Bt-0003UN-MJ; Wed, 14 Aug 2019 21:00:29 -0300 Date: Wed, 14 Aug 2019 21:00:29 -0300 From: Jason Gunthorpe To: Daniel Vetter Cc: LKML , linux-mm@kvack.org, DRI Development , Intel Graphics Development , Andrew Morton , Michal Hocko , David Rientjes , Christian =?utf-8?B?S8O2bmln?= , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Daniel Vetter Subject: Re: [PATCH 3/5] mm, notifier: Catch sleeping/blocking for !blockable Message-ID: <20190815000029.GC11200@ziepe.ca> References: <20190814202027.18735-1-daniel.vetter@ffwll.ch> <20190814202027.18735-4-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190814202027.18735-4-daniel.vetter@ffwll.ch> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 14, 2019 at 10:20:25PM +0200, Daniel Vetter wrote: > We need to make sure implementations don't cheat and don't have a > possible schedule/blocking point deeply burried where review can't > catch it. > > I'm not sure whether this is the best way to make sure all the > might_sleep() callsites trigger, and it's a bit ugly in the code flow. > But it gets the job done. > > Inspired by an i915 patch series which did exactly that, because the > rules haven't been entirely clear to us. I thought lockdep already was able to detect: spin_lock() might_sleep(); spin_unlock() Am I mistaken? If yes, couldn't this patch just inject a dummy lockdep spinlock? Jason