Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1186375imm; Fri, 22 Jun 2018 11:50:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKDZ4rn/W7v5XG2aKjoFeIQAftU6Nlmf23LY6m4Upx5wGtjquAAt9rXJwkbR4GRouZKmhIF X-Received: by 2002:a63:7c03:: with SMTP id x3-v6mr2509108pgc.412.1529693408356; Fri, 22 Jun 2018 11:50:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529693408; cv=none; d=google.com; s=arc-20160816; b=gkZG3mWI4H1Ex1BPhqNF/vf7Q02bpDwq+Wdy1Cl4VC7AqwFdY8j7Yd5U+rmAiMU7yk fTY19+Z1GvMzqi+Kq/3EEH4OepuPHgIIiD3pkl8HxTZi3X+GaQIN6ElHjp0Oaxk5jjEs DGV64NzBWGn0gvJxF7y626Kmf5RuB2eLq7Sf2fqdsGrn/6CBxwwlw72fKuH0fux3JGhH YX/psogw9sxAUUg4jpVI3TOI8LMEr5TmhTeztHgTo7GWEau4saM+RR8YJNUZyTCe8EBS 642NE/y6ZYFRAPIAQFMmp/znke5j7F05n0ij5eW4mA+cMyJmvL+8uh5INnYiYZIJOGeP kKeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=BFIXmd+g4ihjCcgYZskwn6CUGTlTH6dJv1Qnkq946qc=; b=kXqCtONshyaz+2BO40g4Vw80lb5/sitsVclY/7KOkLnJulf2xVZzaBnmuZnsBr9dHz P6CKpXlrTyF704NWC4m2MYGvMXAZ72v1GNppFW1IyStusp0wfK3WiqpQS4P9vnEiHZf4 GwvOv/VljjQRhGj88/kNpBnkopoHwpPrQ1mdVKx9HYBZraRJpZkxJE3sE0GAErqFHL/B ABk25e8Kwf3jIKwazUIbLliydFulzoV03q/mKeCIooZcrwpF32d7GWsYDVIRSTPha4fU bh91PtXprKkUM+IsLABKCxdIfxBFP6uc0K4/AvCrn30ovHuKLd3fQIgG0NgsMBvzNYO/ rv6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=PqjTAFy9; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j13-v6si6408047pgc.288.2018.06.22.11.49.54; Fri, 22 Jun 2018 11:50:08 -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=@google.com header.s=20161025 header.b=PqjTAFy9; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934338AbeFVStS (ORCPT + 99 others); Fri, 22 Jun 2018 14:49:18 -0400 Received: from mail-pg0-f47.google.com ([74.125.83.47]:39639 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933878AbeFVStR (ORCPT ); Fri, 22 Jun 2018 14:49:17 -0400 Received: by mail-pg0-f47.google.com with SMTP id w12-v6so3337688pgc.6 for ; Fri, 22 Jun 2018 11:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=BFIXmd+g4ihjCcgYZskwn6CUGTlTH6dJv1Qnkq946qc=; b=PqjTAFy92x3CvSsLK13B1bqxnOsDT4s7BEgEhhf178HPWAOMK4v1eIB6wI2N2tQ4jj p682eO8K9rhQhru08KMYc/huVIay+6lgd9YMfSt+WjGkot64ICEz81dC1dweve9sp3G7 kgc+Ta3cR/lYBeSJiBu1F5ue0EwA232exqpVKi90/4K8chKlo3Msa0RdxDEnY4gSm7Fo aVRu8iPE65IWl3My6nJXSGs1wsDfiWmzJp+7RVzz79UGVkoyA9fjV/R3EVlWQIwfVJk+ ELVcbBHCCooTEdVXND8XSmk9wq1IQA3H0BsA/PGxEeLErUepMZf3M9PxcPoXdnCpsS7E +kKQ== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=BFIXmd+g4ihjCcgYZskwn6CUGTlTH6dJv1Qnkq946qc=; b=aGs9OfTs74TnwELedCOiCxwfkQiURF3PndvjgDff0+xf6lrZh/21dduOhez2hO7cvD lOHaYu8kxJv+PPsh41ChNaQJVJtMEmYb3BPd79NyPA/5L17aJdgDb2eFzcozQW5hUIKr KD0HTmSUBdzUUXzJ3svGO8lRrQnw88u9eGCcXsd5/kndLsRIpY5ZsoYZVDQC8/JFqmPI t6nyNSh+EPWHdgLewWXqlgF/iNfk/kZDum+0PaZd1evGRmoTiokckl1z6hnOLcjDXx4k MBZAs2q7ojfaufaZEKYl8diZZtrnpukPGrz+ABCzzG6/rvNYnaV6I0bOkfkyPY3IcwdR 4dFQ== X-Gm-Message-State: APt69E0Lu8/sDxFJpOio/VnJtbdNFriD0zMo2QfWR8MsTfnqr4LWayrH 6m9E1pxI8Rioyim+qBG+OhCMTg== X-Received: by 2002:a65:5c89:: with SMTP id a9-v6mr2527021pgt.104.1529693356331; Fri, 22 Jun 2018 11:49:16 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id q4-v6sm10498983pgt.64.2018.06.22.11.49.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Jun 2018 11:49:15 -0700 (PDT) Date: Fri, 22 Jun 2018 11:49:14 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko 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 In-Reply-To: <20180622142917.GB10465@dhcp22.suse.cz> Message-ID: 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> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?