Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3228161imu; Sat, 24 Nov 2018 00:34:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/UZo1XrrsunaAeUDGJnQ5oFrs5V2N106A4ez5dkIXN27H4jLzqxxoFJZUA/U99UnKYntEll X-Received: by 2002:a63:c42:: with SMTP id 2mr17216490pgm.372.1543048495464; Sat, 24 Nov 2018 00:34:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543048495; cv=none; d=google.com; s=arc-20160816; b=g9G0kgTyqruprSPdSVgiB3Sx8KVySmJF8ZGw4J1IBYSYkUrkEZj6X0Z/pYC6JtSQ5l YMXW95RHN1+R5IJJBaJ98YES6o8EsW0r35ziPCO+WL6chhnZEODR6ZzA07Pzn06q00HE cCSIsSwawmWKMldUUGKptYgSVi1gpu2DRXW5AE3B+JmiYjv7tAeT+nUnujJV4waK1QmJ ZcuuxN1H+StQAr/dHqKk0cr7PxwVApTsPxPTqEJSZQNWrL+p0KbVkRB2nUvkfL9xfpuo wIpEYisD9ZrefSaQVtLmRYHfz3gtZi1f/Nbobo4VouZpwWHBiFEO1cYxi4cJAjO9nBtx ENyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=KcJ1DjdZCCv3d5Cqv5LpM3aKWY40y1DmYz+C70bsKUg=; b=GjrVrFhBzF4HyzWw+cW6bHkZZVvmQtPV9vKr6nCES9Q6WZmq3SAekYbyp+fWsl0Mjw EAe0POzxgg68yDXXfpmwWOjdYK7qKkbktu/rV913DgQ8mz0x69Qu0PdRNLmJ3MImDOaE S1l8jfv2xO7Fp4R8Z6HHIF+5pFParjMXvBn/kLG2KuLOE985pPOuHTaGTzftc/pHae8V KT3IQ9jaJbqwpl5XuzKqO+czhGTaQhc3vwxFhy4scaUywQYGKY+pMxtBRJmxOzEum3ms oczsaYlmrg3tCbFf3LKnlZvqMaTmMoAGrPloX5fk2izH1EVG51vKKeO43QfjQ84KeytF VLqQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e129si54314767pgc.333.2018.11.24.00.34.41; Sat, 24 Nov 2018 00:34:55 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504540AbeKXAID (ORCPT + 99 others); Fri, 23 Nov 2018 19:08:03 -0500 Received: from mga07.intel.com ([134.134.136.100]:30414 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394528AbeKXAID (ORCPT ); Fri, 23 Nov 2018 19:08:03 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Nov 2018 05:23:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,269,1539673200"; d="scan'208";a="283559131" Received: from unknown (HELO [10.251.85.254]) ([10.251.85.254]) by fmsmga006.fm.intel.com with ESMTP; 23 Nov 2018 05:23:48 -0800 Subject: Re: [Intel-gfx] [PATCH 2/3] mm, notifier: Catch sleeping/blocking for !blockable To: Daniel Vetter , Michal Hocko Cc: intel-gfx , Linux Kernel Mailing List , dri-devel , Linux MM , Jerome Glisse , David Rientjes , Daniel Vetter , Andrew Morton , =?UTF-8?Q?Christian_K=c3=b6nig?= References: <20181122165106.18238-1-daniel.vetter@ffwll.ch> <20181122165106.18238-3-daniel.vetter@ffwll.ch> <20181123111237.GE8625@dhcp22.suse.cz> <20181123123838.GL4266@phenom.ffwll.local> <20181123124643.GK8625@dhcp22.suse.cz> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc Message-ID: <50923341-d759-2621-7166-695df4cd88fb@linux.intel.com> Date: Fri, 23 Nov 2018 13:23:48 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/11/2018 13:12, Daniel Vetter wrote: > On Fri, Nov 23, 2018 at 1:46 PM Michal Hocko wrote: >> >> On Fri 23-11-18 13:38:38, Daniel Vetter wrote: >>> On Fri, Nov 23, 2018 at 12:12:37PM +0100, Michal Hocko wrote: >>>> On Thu 22-11-18 17:51:05, 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. >>>> >>>> Yeah, it is quite ugly. Especially because it makes DEBUG config >>>> bahavior much different. So is this really worth it? Has this already >>>> discovered any existing bug? >>> >>> Given that we need an oom trigger to hit this we're not hitting this in CI >>> (oom is just way to unpredictable to even try). I'd kinda like to also add >>> some debug interface so I can provoke an oom kill of a specially prepared >>> process, to make sure we can reliably exercise this path without killing >>> the kernel accidentally. We do similar tricks for our shrinker already. >> >> Create a task with oom_score_adj = 1000 and trigger the oom killer via >> sysrq and you should get a predictable oom invocation and execution. > > Ah right. We kinda do that already in an attempt to get the tests > killed without the runner, for accidental oom. Just didn't think about > this in the context of intentionally firing the oom. I'll try whether > I can bake up some new subtest in our userptr/mmu-notifier testcases. Very handy trick - I think I will think of applying it in the shrinker area as well. Regards, Tvrtko