Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp644129imm; Fri, 8 Jun 2018 02:55:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJptbjImewE7Smk8+CaI8z34KAJyYsGB2dnZuHTAgdm4fAjDeJXuP9e1j4Cm7qv/QwwG18Y X-Received: by 2002:a17:902:9309:: with SMTP id bc9-v6mr5884403plb.189.1528451755467; Fri, 08 Jun 2018 02:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528451755; cv=none; d=google.com; s=arc-20160816; b=E6eAL+x/AtDX83lsr1mKdX4uYpaCClwfiweENdGcN3j39/6/yvB6DiGJ2xJ0pBGjlY W0ritv9hJToOPMDl4uSenY8W7bpJG0kjeMmlf3DAADEdwhDRvNdThE2draYDgw+B8Ujx ju7v4SbcUU1AnwbGJ2fxy0Wr7NAgWZBtqj9c3c3QqzZOQ8sAg8Duhl59HJxbjFCtkDCA 7nL5JDcqvNRs3hItYwaJJarVw46KipTDdTAnsWSEDB4SUBENA/yvsBIQFkVWkdQRD6HH vA/leoYDVxIKxKlb65+2JWRHSMp8RDO8x+qJn6fz31Zl3ugPldf8JtfvVLAjPskElx4M MPOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=8YqjHqMOHn6Id/npyL3LA9x6cRtuVLVcGMfO/vigX/c=; b=Y2dI2HHn6AJ5MOcdtS2+FgnBvOG/XO0WVYwKK6VFOElljg+VB4vufBh4s2eSPlCUYq Oey/ESGV+2wHZZvDj6np1NGMvllRjWdIVTUNagBr7cZRNtD3F4RafP5M/QdxngVpErXE I6LJxJ8NJyQYqeEqHW9zn2YAtU1ERM2QOtNrHWnbi+abtl91KyULEEkmqETAJ+exovw3 1fNHR1Okojy09EzJgQ9t+LV9FwP1+I2+zM2DJ8+T7CXc7bOTCgKDISWf0O+tSRb5GYHg aK7UvUvp4Km7g6fI3gluR95M5p24+v2a4LGbEsbsw8kiHkGAGKMVxl0bt98uUefSrmz8 5XZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nsVyTYPg; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s23-v6si31461661pfi.105.2018.06.08.02.55.09; Fri, 08 Jun 2018 02:55:55 -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=@gmail.com header.s=20161025 header.b=nsVyTYPg; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752910AbeFHJxc (ORCPT + 99 others); Fri, 8 Jun 2018 05:53:32 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:46086 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349AbeFHJx3 (ORCPT ); Fri, 8 Jun 2018 05:53:29 -0400 Received: by mail-lf0-f67.google.com with SMTP id j13-v6so19132922lfb.13 for ; Fri, 08 Jun 2018 02:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8YqjHqMOHn6Id/npyL3LA9x6cRtuVLVcGMfO/vigX/c=; b=nsVyTYPgkiV8aKFjXhM0R6frayirAAyydJp9E0aj08To+e2qzWlmhTWDka0Z20ltc8 qWvVWCtf3PLiGINlWgpoDx3pu2wflDh+ZfipQMKYjx+ZppmS7IbKldwxxJflQsHE0huf 3yNrY/seHKwVBdWrcqrMi25nnnn9pcQsFzi6b1nW7Gc+wUZ2i6sfdO3q/5SpkwUnMCrp U8f2kxbTZKGO0xN0buzvp8RgPKzfrFrzulAH/kK4TinLkto4v3IbpxEVc3YfsnX8e2Ri p7nsnBitGgoYF46IBPIZl1UOalxQ9vgDznLutY3Okat5w8wnPKkxVo+e7dAi9jiUXU/X CimA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8YqjHqMOHn6Id/npyL3LA9x6cRtuVLVcGMfO/vigX/c=; b=oauwa/xtXYfnCvgWSz9SY/T+GEz9/1+H89iSX/Q6Nt7p6btClkCXNCTliqQzPRDtwR TpJd3woSJaFgCFSn90Q40lct+4C8sf7aMb+bxQsmpMDEpZOeGpG/jDavjjq1gNbgvXRG 8ZEdCYpXpZUfAOK6A8MI4m8phRh8S/8gwbrNl7BvnLF884gCODDcSMLxyfvDCMQlH705 tjrARztacrtV+cl5eSOgINsCYgYMyKho0/k1vD3d+mdI083MpKB1tX3zjDU2KFj7MDBQ lP1ic+z3AgQ2lSswJqEYZ14o/E+Wmex4dP25lL335H3pQ/UYAwgU26OyZUHKcnsFvDuX G5CQ== X-Gm-Message-State: APt69E2fw0a0Yu+F/mTXRP5TeocdJNIllNBIb3/bhocFUvJov2arMevo F5aePM9kx8XgZEwiGG+Prnqaq/4qobe5tlnCuwQ= X-Received: by 2002:a19:e544:: with SMTP id c65-v6mr3641201lfh.134.1528451607891; Fri, 08 Jun 2018 02:53:27 -0700 (PDT) MIME-Version: 1.0 References: <1527940734-35161-1-git-send-email-ufo19890607@gmail.com> <1527940734-35161-2-git-send-email-ufo19890607@gmail.com> <20180603124941.GA29497@rapoport-lnx> <20180604045812.GA15196@rapoport-lnx> In-Reply-To: <20180604045812.GA15196@rapoport-lnx> From: =?UTF-8?B?56a56Iif6ZSu?= Date: Fri, 8 Jun 2018 17:53:14 +0800 Message-ID: Subject: Re: [PATCH v7 2/2] Refactor part of the oom report in dump_header To: rppt@linux.vnet.ibm.com Cc: akpm@linux-foundation.org, mhocko@suse.com, rientjes@google.com, kirill.shutemov@linux.intel.com, aarcange@redhat.com, penguin-kernel@i-love.sakura.ne.jp, guro@fb.com, yang.s@alibaba-inc.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wind Yu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mike > My question was why do you call to alloc_constrained in the dump_header() > function rather than pass the constraint that was detected a bit earlier to > that function? dump_header will be called by three functions: oom_kill_process, check_panic_on_oom, out_of_memory. We can get the constraint from the last two functions(check_panic_on_oom, out_of_memory), but I need to pass a new parameter(constraint) for oom_kill_process. Thanks