Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3646308imm; Mon, 25 Jun 2018 02:06:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLyVXZkJrsQcQ6f603v3HSKoIXylLuvFu1CZ7xPsB8vHFKfBUjzSAa6QiY5PdD3vv+8ULFN X-Received: by 2002:a63:9856:: with SMTP id l22-v6mr6248398pgo.208.1529917579588; Mon, 25 Jun 2018 02:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529917579; cv=none; d=google.com; s=arc-20160816; b=Mdgmi/dpdYRYS3dy9CoNQ6V3XnJ/OyuW38UIg+wAqYuxz3nHwq2zHuUM+1jYdxDaTQ AL0MZ7qqg+mYnirNz3sk3v59zWy1Up/URKInwUEdnEfq4wDs75hQ/V3AJmg7W8yDSWKV 7N3ffuU+bFzgPMWBm+S8KOqFhcHi8kQHC+BKNIhN1qB6h8ryU3dQjeyw93n9ALZdqdWT vP1uxtHrULDMheveM5BnI94xl6Q8hlLFMRaR2aSXWw3+3AMow539B4dmX66aYOeUZqff oQWaYbbqjhglJTbgS6kl7m/F+5+1WWcnXGtnCgwROTs8C5lLbzTvgkmjB08SY6rNvPvs 7czw== 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=V2qUQh1DOMp7C1RAb1Tf+WcwpnT7r+4IJcIn8g4XaNI=; b=N3LK2LoXnQuENT13B9xhXcHfBYMKED+A2w7mnSF7z+q/o1PdZin7pL+2YBM8P2JOy6 hD3y/S8ARdzJAC1R2+jiVxwhWOFJQosZvvvJgDSrA19xodGbdKnzvFqqpg8VoowE7Vm7 kxAAqZzdvijlSsYOx1vscC0P+PomrgdzBQv8VWJ7xApC0h7EsSgGKHKB2G/WH+AP1eZi wAUF87SJSMt8OTsTyvMOUyovqHFncvKWIifL3G2JkdHHC+Dw5lPWmzYVhbnIXiUP1bJu d2/vJGyvaXPdXeRDj8yJ6F9s/YoSaH22CQ2ckiFtUAlIoK0hhOXaRNGS2nki9JfLbE0J ueaA== 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 l26-v6si2018102pgu.191.2018.06.25.02.06.05; Mon, 25 Jun 2018 02:06:19 -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 S1754729AbeFYJEi (ORCPT + 99 others); Mon, 25 Jun 2018 05:04:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:55117 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754245AbeFYJEh (ORCPT ); Mon, 25 Jun 2018 05:04:37 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D7453AD26; Mon, 25 Jun 2018 09:04:35 +0000 (UTC) Date: Mon, 25 Jun 2018 11:04:34 +0200 From: Michal Hocko To: David Rientjes Cc: Andrew Morton , Tetsuo Handa , "Aneesh Kumar K.V" , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch] mm, oom: fix unnecessary killing of additional processes Message-ID: <20180625090434.GE28965@dhcp22.suse.cz> References: <20180615065541.GA24039@dhcp22.suse.cz> <20180619083316.GB13685@dhcp22.suse.cz> <20180620130311.GM13685@dhcp22.suse.cz> <20180621074537.GC10465@dhcp22.suse.cz> <20180622074257.GQ10465@dhcp22.suse.cz> <20180622142917.GB10465@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 22-06-18 11:49:14, David Rientjes wrote: > On Fri, 22 Jun 2018, Michal Hocko wrote: > > > > > preempt_disable() is required because it calls kvm_kick_many_cpus() with > > > > wait == true because KVM_REQ_APIC_PAGE_RELOAD sets KVM_REQUEST_WAIT and > > > > thus the smp_call_function_many() is going to block until all cpus can run > > > > ack_flush(). > > > > > > I will make sure to talk to the maintainer of the respective code to > > > do the nonblock case correctly. > > > > I've just double checked this particular code and the wait path and this > > one is not a sleep. It is a busy wait for IPI to get handled. So this > > one should be OK AFAICS. Anyway I will send an RFC and involve > > respective maintainers to make sure I am not making any incorrect > > assumptions. > > Do you believe that having the only potential source of memory freeing > busy waiting for all other cpus on the system to run ack_flush() is > particularly dangerous given the fact that they may be allocating > themselves? These are IPIs. How could they depend on a memory allocation? In other words we do rely on the very same mechanism for TLB flushing so this is any different. Maybe I am missing something here though. -- Michal Hocko SUSE Labs