Message ID | 20200227132222.614442921@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=mLYK=4P=vger.kernel.org=stable-owner@kernel.org> 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 06860C5ED22 for <stable@archiver.kernel.org>; Thu, 27 Feb 2020 14:30:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1C0520801 for <stable@archiver.kernel.org>; Thu, 27 Feb 2020 14:30:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582813854; bh=OmW1x3TDx7SRqWix4cRvW6BJJPkzHPdugs65EbCnfKY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nvTa70O6qasALhAt13Hedy52YK1HMRoqKLYGt2jL/ZfKlKwMkJXSlUArIl0TCCfrt du9ng5BOqDB/BS6F3wjAsW8qG3NpFL8LQvE85jhG7bymg9NyHvIW5t9E3rct/cuhNX 3dcdtvzHdAZZhXOLwYSd439QwKtw7ChwH47kWe+0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387711AbgB0Oay (ORCPT <rfc822;stable@archiver.kernel.org>); Thu, 27 Feb 2020 09:30:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:40820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732719AbgB0OEb (ORCPT <rfc822;stable@vger.kernel.org>); Thu, 27 Feb 2020 09:04:31 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9545E20578; Thu, 27 Feb 2020 14:04:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582812271; bh=OmW1x3TDx7SRqWix4cRvW6BJJPkzHPdugs65EbCnfKY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aciU92JCsePrA67OiTsIub5HWW9dfkVh5eQCY+zKGJpGGt2qTLQCYbN8yfAPiAr33 nNIf6zHg7E2v8fUoYkB5NxDL70e6K7jHke8rpkpzS+JUDarvMPs1xoRbuaAuDOBr40 XkaxZ96gnrlGcWiTTMovHLuv4S/r4aM0Ah+PP4j0= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Gavin Shan <gshan@redhat.com>, Roman Gushchin <guro@fb.com>, Andrew Morton <akpm@linux-foundation.org>, Linus Torvalds <torvalds@linux-foundation.org> Subject: [PATCH 4.19 49/97] mm/vmscan.c: dont round up scan size for online memory cgroup Date: Thu, 27 Feb 2020 14:36:57 +0100 Message-Id: <20200227132222.614442921@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227132214.553656188@linuxfoundation.org> References: <20200227132214.553656188@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2446,10 +2446,13 @@ out: /* * Scan types proportional to swappiness and * their relative recent reclaim efficiency. - * Make sure we don't miss the last page - * because of a round-off error. + * Make sure we don't miss the last page on + * the offlined memory cgroups because of a + * round-off error. */ - scan = DIV64_U64_ROUND_UP(scan * fraction[file], + scan = mem_cgroup_online(memcg) ? + div64_u64(scan * fraction[file], denominator) : + DIV64_U64_ROUND_UP(scan * fraction[file], denominator); break; case SCAN_FILE: