Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5559730imm; Mon, 23 Jul 2018 01:44:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe/cfd+bkyNXn5skENUq749IApNsiPu+DfdPmtBfUEy52EAh61GoCq3uMV5SWdsBOrV5hMQ X-Received: by 2002:a62:15c8:: with SMTP id 191-v6mr12191243pfv.194.1532335484493; Mon, 23 Jul 2018 01:44:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532335484; cv=none; d=google.com; s=arc-20160816; b=kGEho1pYUddA7DNbppdvY5D6f0HfPnWSOJgr8O5taR5yvTf0ZyRnoeYzH3zzYW/XwI EZzthRVyeUAvamsS4yNxST9tMd1NlijiWKuCWYYNtBa/0fKNcCh4F1GSbCRb4J3N+QKp JWJOme4ljFCK/1js7Tlr+ubyT1PtZYJEXB1hwO8tBeXm5piYGELif4+AUUDoqUSUINfi hROaT/E2xGmkPgB1sFhJAf+2Jd9UbKL1k0Odon8QTgASNEGhSFk1ti4zwV+bGjHYKhIt FykhzbBwTI3dsrWu23rDlkEsD2xrHEPeovsaE3D2navhW8WCtOWAOeg02dVY31vSPMuM NUvQ== 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:arc-authentication-results; bh=nI4xwbwjktEfwKPgEw1FSwK9RjnEAfytHH1zRHECMKI=; b=PJu+6FRkHZaLJ8Dlt0qFz+tXG9qGNGu0q0/9A49t0S6nqetP3FHRiNxy8+JTWvPQtI xXTkXBMepvD5bpBbiNmLpyAZmdUo7D1LxrvVcsFMSCBL4iyQBLgZENfojbzrjkxgyopu RJHeNSnUQRq/NJK43RDepuSwQtopWJzW5xB7nIrbNlm3ejXJ3gYgeRfSGyi/UlLEH98B SliuXyIrtohrtyXqPj+cfRFhKKSdadCIUX+4/sj21wXL62vl6uYR0xPu9R50/yiWJYEK n/CsKaqeUsZz7b1bRuUqyV4KPZsLhJtifJAfgWo+nt3ymY0RdekcupLUd2lb7ncfPQM2 RA+w== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m12-v6si7476817plt.276.2018.07.23.01.44.29; Mon, 23 Jul 2018 01:44:44 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388059AbeGWJnr (ORCPT + 99 others); Mon, 23 Jul 2018 05:43:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:58100 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387925AbeGWJnr (ORCPT ); Mon, 23 Jul 2018 05:43:47 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5CC68AF44; Mon, 23 Jul 2018 08:43:38 +0000 (UTC) Date: Mon, 23 Jul 2018 10:43:36 +0200 From: Michal Hocko To: Andrew Morton Cc: LKML , linux-mm@kvack.org, "David (ChunMing) Zhou" , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Alex Deucher , David Airlie , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Doug Ledford , Jason Gunthorpe , Mike Marciniszyn , Dennis Dalessandro , Sudeep Dutt , Ashutosh Dixit , Dimitri Sivanich , Boris Ostrovsky , Juergen Gross , =?iso-8859-1?B?Suly9G1l?= Glisse , Andrea Arcangeli , Felix Kuehling , kvm@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-rdma@vger.kernel.org, xen-devel@lists.xenproject.org, Christian =?iso-8859-1?Q?K=F6nig?= , David Rientjes , Leon Romanovsky Subject: Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers Message-ID: <20180723084336.GH17905@dhcp22.suse.cz> References: <20180716115058.5559-1-mhocko@kernel.org> <20180716161249.c76240cd487c070fb271d529@linux-foundation.org> <20180717081201.GB16803@dhcp22.suse.cz> <20180720160125.f3cda46f317a1ff5a2342549@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180720160125.f3cda46f317a1ff5a2342549@linux-foundation.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 20-07-18 16:01:25, Andrew Morton wrote: > On Tue, 17 Jul 2018 10:12:01 +0200 Michal Hocko wrote: > > > > Any suggestions regarding how the driver developers can test this code > > > path? I don't think we presently have a way to fake an oom-killing > > > event? Perhaps we should add such a thing, given the problems we're > > > having with that feature. > > > > The simplest way is to wrap an userspace code which uses these notifiers > > into a memcg and set the hard limit to hit the oom. This can be done > > e.g. after the test faults in all the mmu notifier managed memory and > > set the hard limit to something really small. Then we are looking for a > > proper process tear down. > > Chances are, some of the intended audience don't know how to do this > and will either have to hunt down a lot of documentation or will just > not test it. But we want them to test it, so a little worked step-by-step > example would help things along please. I am willing to give more specific steps. Is anybody interested? From my experience so far this is not something drivers developers using mmu notifiers would be unfamiliar with. -- Michal Hocko SUSE Labs