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=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 1647AC54FCC for ; Tue, 21 Apr 2020 15:16:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CC6DE206A5 for ; Tue, 21 Apr 2020 15:16:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OUQACDkn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC6DE206A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 65A778E0005; Tue, 21 Apr 2020 11:16:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E3388E0003; Tue, 21 Apr 2020 11:16:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4AB218E0005; Tue, 21 Apr 2020 11:16:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0077.hostedemail.com [216.40.44.77]) by kanga.kvack.org (Postfix) with ESMTP id 3218D8E0003 for ; Tue, 21 Apr 2020 11:16:36 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id EB789181AEF1F for ; Tue, 21 Apr 2020 15:16:35 +0000 (UTC) X-FDA: 76732213950.19.robin35_1c71446bbfc25 X-HE-Tag: robin35_1c71446bbfc25 X-Filterd-Recvd-Size: 4678 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Tue, 21 Apr 2020 15:16:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587482194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bWtAP2fX58LI2SwM3jSS8OVtMapvmFY6nTWeDWqG9qk=; b=OUQACDkniugQ4HTAHa3xyd/rKG5qX73XqOo/dALe8cFTdaYNf3eZ9zvGulcBMHLV5fvgPx fosD4H0LiDD76bz7Zb5rSvH8irH13Ctd/YvFRT7ZDgnWCXDrhFIiE8ObQ59gfSDV56q6OU DWrul15VnEWnSb1MgTwf38BkHYzHzs0= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-94-r-2ASamJP5SuXb3QCdmL_A-1; Tue, 21 Apr 2020 11:16:33 -0400 X-MC-Unique: r-2ASamJP5SuXb3QCdmL_A-1 Received: by mail-qk1-f200.google.com with SMTP id a187so14376025qkg.18 for ; Tue, 21 Apr 2020 08:16:33 -0700 (PDT) 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=jOM4weC6TpcAg4wB4lXnSsiBFB5f0u5Eqttp2CDyqno=; b=c7KUhZNmbXXycVrYsQmWujO9IX0GgJQMo9KRgsJi3fhVqWBFTWL+3gO6qrxs/V92Gj Z2B+lrDySjbti7my2TKwcC5VElznPODImkVydPu+SPhhNPNB/oHn1sE1GiOoS8GDtXWi ba01t6ypqTLN83rY5qtjIJcgSE9KKf30LDK8z7hJOIe44/8KN4iWj0HaS8LnDSyqnm0e qGnuO2Tz8qgT9OriOa9RgZA+MdVVzcYOUO5vgdaFJU00/LyL3FMvvPP0iDFHorbZwkI8 yyAApgtifeTMxnSzqn/d5PXzHKyudBuCmh4IMtCccCwZzlOKU9ooIfFX5qmJga/oeZh7 kdTw== X-Gm-Message-State: AGi0PuaEpmxGnxoLucfgL9EBygUXVA+zF2jfIE+hW8FczL27BQIVYwjL sm738jaBKgDxy0H6cH3+H569FPgR0Craapg61kS411ByITsb3OvmrLgAVTSg67yqmm6fN3ejYfj dkiv1wXtbUqA= X-Received: by 2002:a0c:b604:: with SMTP id f4mr2854374qve.40.1587482192610; Tue, 21 Apr 2020 08:16:32 -0700 (PDT) X-Google-Smtp-Source: APiQypLEuWxVwkViiokLApaoye3yy37kg97hMnAjfB8uy6nIohQlrmv+haZhugt1Ouy8ojkwZC9/rQ== X-Received: by 2002:a0c:b604:: with SMTP id f4mr2854325qve.40.1587482192132; Tue, 21 Apr 2020 08:16:32 -0700 (PDT) Received: from xz-x1 ([2607:9880:19c0:32::2]) by smtp.gmail.com with ESMTPSA id g12sm1947617qtu.69.2020.04.21.08.16.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 08:16:31 -0700 (PDT) Date: Tue, 21 Apr 2020 11:16:29 -0400 From: Peter Xu To: Michal Hocko Cc: Andrew Morton , Linus Torvalds , linux-mm@kvack.org, LKML Subject: Re: [PATCH] mm, mempolicy: fix up gup usage in lookup_node Message-ID: <20200421151629.GG420399@xz-x1> References: <20200421071026.18394-1-mhocko@kernel.org> <20200421132916.GE420399@xz-x1> <20200421144603.GI27314@dhcp22.suse.cz> MIME-Version: 1.0 In-Reply-To: <20200421144603.GI27314@dhcp22.suse.cz> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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: On Tue, Apr 21, 2020 at 04:46:03PM +0200, Michal Hocko wrote: > I thought I have explained that when we have discussed last time and the > changelog is explaining that as well. Checking for impossible error code > is simply confusing and provokes for copy&pasting this pattern. I > wouldn't really bother if I haven't seen this cargo cult pattern in the > so many times. It's just my poor habit to avoid churns like this. Say, if the check is no= t there, I definitely shouldn't add that check without explicit reason. Howe= ver if it's there already (and it's not an extremely hot path so no number to s= how that it will bring any performance impact), then I won't touch it either without a good reasoning. "Somebody could copy & paste the same code" isn'= t a reason to me - that's something we can observe when reviewing a patch. I've broken some code due to some tiny trivial small changes that I thought won't hurt, and I've also been debugging for hours due to some "should be trivial" patches from others. This is how the habit comes... But it's not a strong opinion either. I'd be fine if the patch is liked by others and Andrew would like to queue it. Thanks, --=20 Peter Xu