Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3181739imm; Sun, 3 Jun 2018 21:59:07 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK2Gl+4ZOvYuBZFR39CUEbShnmpLGbBbScTrEddQqYy8SRGObnIUtV/4K/5liZloU0TXScM X-Received: by 2002:a65:4146:: with SMTP id x6-v6mr15965909pgp.221.1528088347721; Sun, 03 Jun 2018 21:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528088347; cv=none; d=google.com; s=arc-20160816; b=iLSxmWfo6MnoU8gAEs1htg280XaAU3hx+6W2bSL1nvsi3e6b2ZryrMtzHdXIt+2XUr zQs1y5werNeY1GjIegIAjARrPAse8VK827vcWXDx6EyWKXKzNsZMC3oR46dPeNGYKuvG JUCZ1xKfvpQJKqKh/mgjG2ADj+LWKadsZvGabwOhKltgCI6aipG5CXUFJaTGgdkVy+lF /m4P4Gkj7hRbqXYRzBvHoEjzjwDwfd+qaduuLBA/WcphnEjbUVsyp60U+vLMzLrGP39E CyVXaPJIq3eVXKio45r3kg/vsxgW9hSlOatMoiM2uzQRtPc7CxLWkGVcP+BDEDrzKBp7 BUMg== 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=SvFpoieakeMheNdf/fQU+h7miXUJv1SdesQs2s23PuY=; b=wAI2JWISl/gpmfuIEAg0DWLDerwJaE/BpiQODOkY3aa+RVtZ4rLnrpoBu2rD4NoSp0 nPyts+xYIC4Yph/X/FlIhed4HyzCk1pocf0m9ennKdCvSqUpwNgImwAFR9l0l/WTGuLi TPC9X799N2rV9IHFni5E1MlhyjRGltwADZTbLF6I8QHC3DjiW/z/ZbBk2j4V1x7l8/Z6 oJwwRH2ZJ7h6UIhlGF1F6vJSVYg6OJXHMZr+7BBGWyyoU0jcDiqV7D/5inVUnyR6pdom pWBHACdEKtJnI1uOb4cCiIzUj43G+SyltqX8WFukQA9GujYHuCqGoEztX+PGDqXZkzew TCzA== 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 f5-v6si44954844pfb.314.2018.06.03.21.58.49; Sun, 03 Jun 2018 21:59:07 -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 S1751786AbeFDE6X (ORCPT + 99 others); Mon, 4 Jun 2018 00:58:23 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47248 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751061AbeFDE6W (ORCPT ); Mon, 4 Jun 2018 00:58:22 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w544sEKV012097 for ; Mon, 4 Jun 2018 00:58:22 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2jctrsq80r-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 04 Jun 2018 00:58:21 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 4 Jun 2018 05:58:20 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 4 Jun 2018 05:58:16 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w544wF1U30146676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Jun 2018 04:58:15 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1283952041; Mon, 4 Jun 2018 04:47:57 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.192]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 29D3552043; Mon, 4 Jun 2018 04:47:56 +0100 (BST) Date: Mon, 4 Jun 2018 07:58:12 +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> 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: 18060404-0028-0000-0000-000002CC5750 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18060404-0029-0000-0000-00002382DA2A Message-Id: <20180604045812.GA15196@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-04_03:,, 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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806040061 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 04, 2018 at 10:41:10AM +0800, 禹舟键 wrote: > Hi Tetsuo > > Since origin_memcg_name is printed for both memcg OOM and !memcg OOM, it is strange that origin_memcg_name is updated only when memcg != NULL. Have you really tested !memcg OOM case? > > if memcg == NULL , origin_memcg_name will also be NULL, so the length > of it is 0. origin_memcg_name will be "(null)". I've tested !memcg OOM > case with CONFIG_MEMCG and !CONFIG_MEMCG, and found nothing wrong. > > Thanks > Wind > 禹舟键 于2018年6月4日周一 上午9:58写道: > > > > Hi Mike > > > Please keep the brief description of the function actually brief and move the detailed explanation after the parameters description. > > Thanks for your advice. > > > > > The allocation constraint is detected by the dump_header() callers, why not just use it here? > > David suggest that constraint need to be printed in the oom report, so > > I add the enum variable in this function. 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? Sorry if wasn't clear enough. > > Thanks > > Wind > -- Sincerely yours, Mike.