From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14CF1C2D0C4 for ; Tue, 10 Dec 2019 21:04:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CA9FE2465C for ; Tue, 10 Dec 2019 21:04:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="OjVkow0S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA9FE2465C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6227A6B2E56; Tue, 10 Dec 2019 16:04:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F9146B2E57; Tue, 10 Dec 2019 16:04:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 50F1B6B2E58; Tue, 10 Dec 2019 16:04:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0004.hostedemail.com [216.40.44.4]) by kanga.kvack.org (Postfix) with ESMTP id 390666B2E56 for ; Tue, 10 Dec 2019 16:04:07 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 03FA08249980 for ; Tue, 10 Dec 2019 21:04:07 +0000 (UTC) X-FDA: 76250459334.24.part31_7b2f392d58f3b X-HE-Tag: part31_7b2f392d58f3b X-Filterd-Recvd-Size: 3909 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Dec 2019 21:04:06 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id q6so208940wro.9 for ; Tue, 10 Dec 2019 13:04:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=t5wRb0HVinMm6EfDaWAnO/a1Sj3+z3DX/7PLYloGfXc=; b=OjVkow0SpbjcoF1OWjpltk1vI3YxAw2jQt8Cq6d1x/Btjj1F3u4QeDCqIVyZYELWWn lXo4Q8crVZNDfrrurZiFUJUCwelB3pjClmCwC1fxlalGIcZiAwo5pMgLil3e2tONS9X5 v7g3C9cMkECg6NxNdXCychqgWcQNo1wWAF9mk= 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:message-id:references :mime-version:content-disposition:in-reply-to; bh=t5wRb0HVinMm6EfDaWAnO/a1Sj3+z3DX/7PLYloGfXc=; b=L43fy5ij3gYycacCbfSZfMau2HwpRaCskmnp0GITfeZ9Znigm6SCp/ZqQlYnZwezve vVORSGMvDl69mV46OYEutK+CrddKA1cv16NcspB/fvRdAtMJN/QfYsxdh5BPoFnLd3bV 88yscAdsSlfLBLVqVY5b10hPoQ5FbpjjkVAgibW/6rvGf/s4z6v1xAypmR3s5KXsTSxP M31qne0b25daH7u3cBM1MaRVsdAItpEWKtmnfPolNJsrsF+RdF50xhk0JPaBg6X5p8LY kZ3Gyz5i9aIyuP1WKF67pZH4r8AKYIV/JKegxeEUDYGziyEgeCP8CGGGnvawN+IEr9jZ 3p6w== X-Gm-Message-State: APjAAAXadQO1o13VHug7xNczGotHCNEvIv6zj/5XdKlOWNMnLV2jRCWQ A7zqyTF61C5XKQ0UzvMFIQ4hZA== X-Google-Smtp-Source: APXvYqy79TBCNpPOmBCd880DGqLHwk7LRohDsnP9Y0U3hQ0Ejrk0NnEgnxTg3iGWHnZTuaLKKdJiTQ== X-Received: by 2002:a5d:50d2:: with SMTP id f18mr5456797wrt.366.1576011844881; Tue, 10 Dec 2019 13:04:04 -0800 (PST) Received: from localhost ([89.32.122.5]) by smtp.gmail.com with ESMTPSA id p10sm4422433wmi.15.2019.12.10.13.04.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2019 13:04:04 -0800 (PST) Date: Tue, 10 Dec 2019 21:04:03 +0000 From: Chris Down To: chengkaitao Cc: hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com, akpm@linux-foundation.org, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, smuchun@gmail.com, Michal Hocko Subject: Re: [PATCH v2] mm: cleanup some useless code Message-ID: <20191210210403.GA455280@chrisdown.name> References: <20191210160450.3395-1-pilgrimtao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191210160450.3395-1-pilgrimtao@gmail.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: chengkaitao writes: >Subject: Re: [PATCH v2] mm: cleanup some useless code Can you please write a more descriptive commit title? Seeing this in the commit history tells the reader nothing, "code" could mean anything from a state machine to a boolean, and "cleanup" could mean anything from some complex refactoring to something trivial like this, and right now I have to look and see the individual commit. This patch is really just deduplication of effort. Perhaps: mm, memcg: Don't check PageTransHuge before calling hpage_nr_pages >It is much simpler to just use hpage_nr_pages for nr_pages and replace >the local variable by PageTransHuge check directly Heh, calling it "much" simpler seems a bit excessive. I mean, the code is just as readable in both cases, but if it's going to go in, then that's fine. Any merge conflict should be trivial enough to fix. >Signed-off-by: Kaitao Cheng >Acked-by: Michal Hocko I'm indifferent to this patch, but after the title change: Acked-by: Chris Down