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: 13016813 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF4BEFA373F for ; Mon, 24 Oct 2022 08:15:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1FD2A8E0001; Mon, 24 Oct 2022 04:15:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1BC6D8E0008; Mon, 24 Oct 2022 04:15:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E1A558E0001; Mon, 24 Oct 2022 04:15:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D08268E0005 for ; Mon, 24 Oct 2022 04:15:14 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id ADE2480B17 for ; Mon, 24 Oct 2022 08:15:14 +0000 (UTC) X-FDA: 80055132948.14.5D281EE Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf14.hostedemail.com (Postfix) with ESMTP id 48C8810001F for ; Mon, 24 Oct 2022 08:15:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666599313; 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=LqFOsrk3CRFB9mV7hYid/wfXFxFFoQq7PtRYmHrZ0CmUIrSr+4sUbsdGRfAk6SDpIeVyhI 6e5Rqn9ectneSQJ6gCm3isi2rBweVNeO/vUVHdRi4uTqXVvOdAaN8B8fO/HYH2Cpidkie1 Jv8t1QmLYzs1EdQFEYfu4+gN+3sNbU4= 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666599314; h=from:from:sender: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:dkim-signature; bh=lMCNuRuv+p/VyO8f2sd5NbLS+a0poTkVGW4v1nMo8cA=; b=AsohQF0Ro7RwOKveO14RPuhpR9ryXC2pKPWu2NyLOW/5wq0msaIQfWqQpFXmRhwk68omhs kyg2YTZElNOWxsfciMTTigdKLnS1/XLTyjI8YtJdjOZG+NaAN7xrLjMiK5q8AXEGPuHlEq qxAe70AMMEGRSUUcxxQTq2BU1R++FBk= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LqFOsrk3; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf14.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666599314; a=rsa-sha256; cv=none; b=4ud5xpoD0Q1mB1ilvWBz7b1kJYRLX20nOqnm5yYhzAVqREkwwBdr2BSDVFTdGSs+ghtZgg MUEDGFad026h+YwvV8vSJHD9loB7u6QyyaYR3BSMcVyG82MfhgK/xg8G5ZvgsaBRakKPE8 LYkdCH9/NIzEsaSyaunr7ocR8i4n5nM= X-Rspam-User: X-Rspamd-Queue-Id: 48C8810001F X-Stat-Signature: abd1sg6cnatz1f5qsnae4w9q65f631ja Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LqFOsrk3; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf14.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com X-Rspamd-Server: rspam07 X-HE-Tag: 1666599314-203393 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: 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);