Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2662383imm; Sat, 9 Jun 2018 22:13:28 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJG8dqjBXoakF/xj5f7XLDrT6InwqaduoeFEtL0pOwnVQ3OzqbEItrtxaBnWR5pDC8A0neZ X-Received: by 2002:a17:902:6a89:: with SMTP id n9-v6mr13094821plk.302.1528607608268; Sat, 09 Jun 2018 22:13:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528607608; cv=none; d=google.com; s=arc-20160816; b=u5a8ImWgVUBWtmSqxysNJnVpmpCb1qzGe+manqIQy8qaNEfzBxM+o0v+sIVRRL6at2 OxCxSPjp0cv949DnG/+78wYRRoFPSz4+5Nh3/FL0zbXrFkQIrKBYLIYbhcPa+3gYhGVu jcS7Fn0kCpuMCtYCoMRh8kx/1dpzZyXXWgkEHepSIDdUENMOTjOv/wa7nZboHq2UbaSD 3X3+WP6Mo4UP9aOFi5I9X2QVaRxAT8faOsRlfiJWhKQ9xU6elnn/k77AvUrlgK9gT/99 ozDUZUf9iOusHRpXptxqo4mJarWTBoxFArl+u6DtuSGOj8dj5aEHdMayxMbDahx2JIWv eiOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:subject:cc:to:from:date:arc-authentication-results; bh=ZYjChHCz0PmBQ3dyfJbnEBr0NvamRNKmDtJKy/dJI60=; b=JPZqc88z2Ub+y+Xd/BabDpF5OwcEtnW/TUs4AL2XEvbRnXvqr4MwnlPlTJE03a7VEB wFBu3gSJ7rM17gjYIN3aYu91lgfz46w/0FRBpuwg2vuDEKSGJG64jxCmHLydx7711lE0 gfvWj6tKmpS78kwqS9ayMMs5BYaX9MoBxvBRsohNdtT7QZNn7qqRJAngw7q26V8NwKgG zzzyWWy+LAbsIOKMYtqG4dFNHVnFTUkbfqn5HuAw9w8CnEoyRryCpG2kKzHL+IY5w40H 5j11hkR5K8OJyKjQWXaHPaVmS1QFem6qpqz5XXopP+Sngn8V1haF/2RYH1LuqqOLstAs x5rw== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q6-v6si35745546plr.134.2018.06.09.22.13.02; Sat, 09 Jun 2018 22:13:28 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753729AbeFJFM2 (ORCPT + 99 others); Sun, 10 Jun 2018 01:12:28 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:32864 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753539AbeFJFM1 (ORCPT ); Sun, 10 Jun 2018 01:12:27 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5A59TXE020865 for ; Sun, 10 Jun 2018 01:12:27 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jgv5rj2c9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 10 Jun 2018 01:12:27 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 10 Jun 2018 06:12:24 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sun, 10 Jun 2018 06:12:19 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5A5CJO434144282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 10 Jun 2018 05:12:19 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A566E42049; Sun, 10 Jun 2018 06:02:34 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ADC1642047; Sun, 10 Jun 2018 06:02:33 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.110]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Sun, 10 Jun 2018 06:02:33 +0100 (BST) Date: Sun, 10 Jun 2018 08:12:16 +0300 From: Mike Rapoport To: =?utf-8?B?56a56Iif6ZSu?= 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 Subject: Re: [PATCH v7 2/2] Refactor part of the oom report in dump_header 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18061005-4275-0000-0000-0000028C062F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18061005-4276-0000-0000-000037931FFE Message-Id: <20180610051215.GA20681@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-10_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=643 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806100060 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 08, 2018 at 05:53:14PM +0800, 禹舟键 wrote: > 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. Another option is to add the constraint to the oom_control structure. > Thanks > -- Sincerely yours, Mike.