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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 8180DC432C0 for ; Mon, 25 Nov 2019 17:44:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 596D120740 for ; Mon, 25 Nov 2019 17:44:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574703885; bh=HqJtfcNQwz2XxTyWGiw8I90Hmgw5XXPV2DuPdRZqScQ=; h=Subject:To:Cc:From:Date:List-ID:From; b=UDnyX0n3OYncYcobJRCL04/eTeF75QCOhVCFKEVOeoAcH/pZXTFsxDSfng4MiNK3s Kn64cr45/4JRRFzKr8y3hZPWR8Mffi2N9krYJuOYER/IOb51pIFyd/Rbc3ZzlqWyKA 8C/EDi7E6LJuYT04kdsklJtjIpOWAhhCB+ydnZfw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727590AbfKYRop (ORCPT ); Mon, 25 Nov 2019 12:44:45 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:39571 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbfKYRoo (ORCPT ); Mon, 25 Nov 2019 12:44:44 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E181422764; Mon, 25 Nov 2019 12:44:43 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 25 Nov 2019 12:44:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=fmf76T ZYGu/Jhqjs5HxCHMg4plKtPUTgqkBU7UKODtk=; b=i4EgGKh2XlpKKrGVcjvaBO 7aJ/2a6sPc5Hh1Bsw8slBw8t4jG52vKy9v9RFqhJDss1VzHoF0P2myTXwemzB6NB tBlzbQpkzbonPZrdb3sWjW9dS+8+WGYpPl+HQVR1GztVixMjHoQlrbv1uZysmgE7 3Byb7vTaXQr7YgHGsd/y96BLyw5KkUSWUJ5ejwOP+n6+4KsCX/CMImf36mD5Db2V QWghXqVsF6EVZt8uYMAX6nu82MVI2JYGPB55x/BXo++pP4f7rTpo7IkmL4Qk0FlE 1dWs/BhwvNy0P6SP4jM8oxud7SwKeS0O3z948TLTUIl9rv/7BvpLLdZaPaWudXdw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudeiuddguddthecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvhfffkfggtgfgsehtkeertd dttdflnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdho rhhgqeenucfkphepkeefrdekiedrkeelrddutdejnecurfgrrhgrmhepmhgrihhlfhhroh hmpehgrhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpeeg X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 58607306005F; Mon, 25 Nov 2019 12:44:43 -0500 (EST) Subject: FAILED: patch "[PATCH] virtio_balloon: fix shrinker count" failed to apply to 4.19-stable tree To: wei.w.wang@intel.com, david@redhat.com, mst@redhat.com Cc: From: Date: Mon, 25 Nov 2019 18:44:42 +0100 Message-ID: <1574703882140153@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From c9a6820fc0da2603be3054ee7590eb9f350508a7 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Tue, 19 Nov 2019 05:02:33 -0500 Subject: [PATCH] virtio_balloon: fix shrinker count Instead of multiplying by page order, virtio balloon divided by page order. The result is that it can return 0 if there are a bit less than MAX_ORDER - 1 pages in use, and then shrinker scan won't be called. Cc: stable@vger.kernel.org Fixes: 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") Signed-off-by: Wei Wang Signed-off-by: Michael S. Tsirkin Reviewed-by: David Hildenbrand diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 51134f9a3ee7..e05679c478e2 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -826,7 +826,7 @@ static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker, unsigned long count; count = vb->num_pages / VIRTIO_BALLOON_PAGES_PER_PAGE; - count += vb->num_free_page_blocks >> VIRTIO_BALLOON_FREE_PAGE_ORDER; + count += vb->num_free_page_blocks << VIRTIO_BALLOON_FREE_PAGE_ORDER; return count; }