From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Davydov Subject: Re: [RFC PATCH v2 1/7] mm, oom: refactor select_bad_process() to take memcg as an argument Date: Sun, 4 Jun 2017 22:25:54 +0300 Message-ID: <20170604192553.GA19980@esperanza> References: <1496342115-3974-1-git-send-email-guro@fb.com> <1496342115-3974-2-git-send-email-guro@fb.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=//o8dHrIJHctWYvZ9veBgVjRYQ7diQNEOqqSzIDmefQ=; b=XjPuFbtx/vS6jsQq9F3/TjKwV4NzZI5t+Wwd5OqxXXyXRhP7Hu4avDAMHpDz8MzoYS HCG7vQyuV4IPo/rA4L75HmuyRBgT1Ex3UFtAF0ankub1BB8u8yDSTnTxv70Xeh6OhKtl cxNCR7Hs26l0fa9yxg6Z1xihpNs5D7qrLvlrnSdz+XfRcr25wemc39TG7zcmI65OlPfP mfJtrEINa2Lyd2wd0uL7HLrKACmF1qtJLYQqbMCE5/xD/LD5acQYWWDAjmlVLovpqHrS hXp7OgiKd543baCpIAr1tfLqUfEJyGyfU0vpyC5ES3h14sLq6qhHD+jgOKQYilVUXdY8 QONw== Content-Disposition: inline In-Reply-To: <1496342115-3974-2-git-send-email-guro-b10kYP2dOMg@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Roman Gushchin Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Tejun Heo , Johannes Weiner , Li Zefan , Michal Hocko , Tetsuo Handa , kernel-team-b10kYP2dOMg@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Thu, Jun 01, 2017 at 07:35:09PM +0100, Roman Gushchin wrote: > The select_bad_process() function will be used further > to select a process to kill in the victim cgroup. > This cgroup doesn't necessary match oc->memcg, > which is a cgroup, which limits were caused cgroup-wide OOM > (or NULL in case of global OOM). > > So, refactor select_bad_process() to take a pointer to > a cgroup to iterate over as an argument. IMHO this patch, as well as patches 2-5, doesn't deserve to be submitted separately: none of them make sense as a separate change; worse, patches 4 and 5 introduce user API that doesn't do anything without patch 6. All of the changes are relatively small and singling them out doesn't really facilitate review, so I'd merge them all in patch 6. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f70.google.com (mail-lf0-f70.google.com [209.85.215.70]) by kanga.kvack.org (Postfix) with ESMTP id 2CD066B0292 for ; Sun, 4 Jun 2017 15:26:01 -0400 (EDT) Received: by mail-lf0-f70.google.com with SMTP id b65so9275325lfh.8 for ; Sun, 04 Jun 2017 12:26:01 -0700 (PDT) Received: from mail-lf0-x241.google.com (mail-lf0-x241.google.com. [2a00:1450:4010:c07::241]) by mx.google.com with ESMTPS id p129si3183894lfp.49.2017.06.04.12.25.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Jun 2017 12:25:59 -0700 (PDT) Received: by mail-lf0-x241.google.com with SMTP id f14so8140557lfe.1 for ; Sun, 04 Jun 2017 12:25:58 -0700 (PDT) Date: Sun, 4 Jun 2017 22:25:54 +0300 From: Vladimir Davydov Subject: Re: [RFC PATCH v2 1/7] mm, oom: refactor select_bad_process() to take memcg as an argument Message-ID: <20170604192553.GA19980@esperanza> References: <1496342115-3974-1-git-send-email-guro@fb.com> <1496342115-3974-2-git-send-email-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1496342115-3974-2-git-send-email-guro@fb.com> Sender: owner-linux-mm@kvack.org List-ID: To: Roman Gushchin Cc: linux-mm@kvack.org, Tejun Heo , Johannes Weiner , Li Zefan , Michal Hocko , Tetsuo Handa , kernel-team@fb.com, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org On Thu, Jun 01, 2017 at 07:35:09PM +0100, Roman Gushchin wrote: > The select_bad_process() function will be used further > to select a process to kill in the victim cgroup. > This cgroup doesn't necessary match oc->memcg, > which is a cgroup, which limits were caused cgroup-wide OOM > (or NULL in case of global OOM). > > So, refactor select_bad_process() to take a pointer to > a cgroup to iterate over as an argument. IMHO this patch, as well as patches 2-5, doesn't deserve to be submitted separately: none of them make sense as a separate change; worse, patches 4 and 5 introduce user API that doesn't do anything without patch 6. All of the changes are relatively small and singling them out doesn't really facilitate review, so I'd merge them all in patch 6. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751413AbdFDT0F (ORCPT ); Sun, 4 Jun 2017 15:26:05 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36064 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751169AbdFDT0A (ORCPT ); Sun, 4 Jun 2017 15:26:00 -0400 Date: Sun, 4 Jun 2017 22:25:54 +0300 From: Vladimir Davydov To: Roman Gushchin Cc: linux-mm@kvack.org, Tejun Heo , Johannes Weiner , Li Zefan , Michal Hocko , Tetsuo Handa , kernel-team@fb.com, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 1/7] mm, oom: refactor select_bad_process() to take memcg as an argument Message-ID: <20170604192553.GA19980@esperanza> References: <1496342115-3974-1-git-send-email-guro@fb.com> <1496342115-3974-2-git-send-email-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1496342115-3974-2-git-send-email-guro@fb.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 01, 2017 at 07:35:09PM +0100, Roman Gushchin wrote: > The select_bad_process() function will be used further > to select a process to kill in the victim cgroup. > This cgroup doesn't necessary match oc->memcg, > which is a cgroup, which limits were caused cgroup-wide OOM > (or NULL in case of global OOM). > > So, refactor select_bad_process() to take a pointer to > a cgroup to iterate over as an argument. IMHO this patch, as well as patches 2-5, doesn't deserve to be submitted separately: none of them make sense as a separate change; worse, patches 4 and 5 introduce user API that doesn't do anything without patch 6. All of the changes are relatively small and singling them out doesn't really facilitate review, so I'd merge them all in patch 6.