From patchwork Mon Oct 24 08:14:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 8224 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp318332wru; Mon, 24 Oct 2022 01:21:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7sKRSZKDPFobPD19evnkLaPX3q+uy91p2ykWHODiobR0oGr7ByXHRgJ4aJGNmECZYDWJzk X-Received: by 2002:a05:6402:2687:b0:45d:3a94:348f with SMTP id w7-20020a056402268700b0045d3a94348fmr29567378edd.48.1666599711145; Mon, 24 Oct 2022 01:21:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666599711; cv=none; d=google.com; s=arc-20160816; b=iSY+9QdCO/6tKuyIcDWjwgmhBeSVKV7Mu4Mh0VjM8Cs5Q1Hv5HzUSftCZ5Pqbdpt1E n+6ocQsqEAv2jWin4YaCqCptE0V7SC5IY0ytd8oOgBJJR1P1mUipzicoa/WoL+1HXp6d sHLa25jBJmMRQPhwAaur+ej3mmPXAf/LR8kkZ0CmJ7GY/dIXO9W0FppF7bacbMkWNLPX urMHwQJ7ItYrRae/7Ugdo7s10bnV1PNR0mt4buEqJ8fI4nLXhqKzXpJOn7DmnegHXU4+ YPoU+Wf6oxoD2tM4taWqsbaFkFbPQd1ejYeV60x9RoWDhDXqI/P0W/Dsvi83ZZwSSLn2 4MZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lMCNuRuv+p/VyO8f2sd5NbLS+a0poTkVGW4v1nMo8cA=; b=Hp8iLSVbkC7cxKxEtweIdhkypx/+5y3ZYvl8V1nr5vjW9/IwjCIIb2BFiCrb0tRWB2 shkDu0EXBmoJnnbe3+p27Oa2TUUuqxZXuVT11t78ANJTryQYyu1DsaquHhxq9SC1RPHx O2PGk15wjJ8ZWmyRYbHMNjYVdXalMPjD9MCMJwGioHOGbPQJVyoXRcULYdaqzmx+hU2F s3FeHBoNy6p952KsaWUz30kJGvvNEZINhBYcqruZR77ozOOh+jvqqQmnD0IRBbzhUHM8 qQpQcjqF+dYjnNUzskQzmoaEWX9sCGsOqvfKmcgq8yfFQCYBjMrVXQQy6OEZThY8zFWm IaPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OAPboD57; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m2-20020a1709062ac200b0078da856a4ecsi20890082eje.391.2022.10.24.01.21.27; Mon, 24 Oct 2022 01:21:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OAPboD57; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230350AbiJXIRQ (ORCPT + 99 others); Mon, 24 Oct 2022 04:17:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230312AbiJXIQh (ORCPT ); Mon, 24 Oct 2022 04:16:37 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7488E5D0E5 for ; Mon, 24 Oct 2022 01:15:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666599315; 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=lMCNuRuv+p/VyO8f2sd5NbLS+a0poTkVGW4v1nMo8cA=; b=OAPboD57Tw1rxbkMuw+eIV0yL0zgiwyjnlV8QHB36bErKTWz0F35lQku2BqYHhNgONu31Y AC8azW8mSlwIE40Ung+p5XebdtrfJTdsOj1vkPahj2zdvn8ygnZYd9DWkAIH5Eyu+sl8rU XsiAy8dGPY/Bi5ajijHvENAtUy4sJVk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-523-oh6QCyUQPPSLXucDD99q_w-1; Mon, 24 Oct 2022 04:15:04 -0400 X-MC-Unique: oh6QCyUQPPSLXucDD99q_w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4611181DA23; Mon, 24 Oct 2022 08:15:03 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-35.pek2.redhat.com [10.72.12.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id C4C4640C6F9F; Mon, 24 Oct 2022 08:14:59 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: Dennis Zhou , Tejun Heo , Christoph Lameter , Andrew Morton , linux-mm@kvack.org, Baoquan He Subject: [PATCH 5/8] mm/percpu: replace the goto with break Date: Mon, 24 Oct 2022 16:14:32 +0800 Message-Id: <20221024081435.204970-6-bhe@redhat.com> In-Reply-To: <20221024081435.204970-1-bhe@redhat.com> References: <20221024081435.204970-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747556458502311125?= X-GMAIL-MSGID: =?utf-8?q?1747556458502311125?= In function pcpu_reclaim_populated(), the line of goto jumping is unnecessary since the label 'end_chunk' is near the end of the for loop, use break instead. Signed-off-by: Baoquan He Acked-by: Dennis Zhou --- mm/percpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/percpu.c b/mm/percpu.c index 09e407338573..954abf916c7d 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -2167,7 +2167,7 @@ static void pcpu_reclaim_populated(void) /* reintegrate chunk to prevent atomic alloc failures */ if (pcpu_nr_empty_pop_pages < PCPU_EMPTY_POP_PAGES_HIGH) { reintegrate = true; - goto end_chunk; + break; } /* @@ -2203,7 +2203,6 @@ static void pcpu_reclaim_populated(void) end = -1; } -end_chunk: /* batch tlb flush per chunk to amortize cost */ if (freed_page_start < freed_page_end) { spin_unlock_irq(&pcpu_lock);