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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79AB0C04A94 for ; Wed, 16 Aug 2023 06:49:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242180AbjHPGt0 (ORCPT ); Wed, 16 Aug 2023 02:49:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238883AbjHPGtQ (ORCPT ); Wed, 16 Aug 2023 02:49:16 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDFE91FD0 for ; Tue, 15 Aug 2023 23:49:14 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B18DE1F74C; Wed, 16 Aug 2023 06:49:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1692168553; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4bO4q3DFLkSAtmvUq+ZKw9sKGdZUVknegi6CSzfugZU=; b=ZsX6smdEVteWd98vAaeNm2z7kbPFhiM9F6u8oOtvUpnmJSlqq3kUY9+Zs7Xt4nyfwtCiu4 hppFZb8i9YIn2hRhhYVEQLjtHOE2tr2aeHfEL4z2lO/KLGaPxvdfxxclTW7LwtGCSMPCA+ ilXX+CzjWdu6484X79btbIR9g9oQ5UE= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 864D8133F2; Wed, 16 Aug 2023 06:49:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id K2PmHWlx3GS0ewAAMHmgww (envelope-from ); Wed, 16 Aug 2023 06:49:13 +0000 Date: Wed, 16 Aug 2023 08:49:12 +0200 From: Michal Hocko To: "Huang, Ying" Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Lameter , Mel Gorman , Vlastimil Babka Subject: Re: [PATCH] mm: fix draining remote pageset Message-ID: References: <20230811090819.60845-1-ying.huang@intel.com> <87r0o6bcyw.fsf@yhuang6-desk2.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r0o6bcyw.fsf@yhuang6-desk2.ccr.corp.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 14-08-23 09:59:51, Huang, Ying wrote: > Hi, Michal, > > Michal Hocko writes: > > > On Fri 11-08-23 17:08:19, Huang Ying wrote: > >> If there is no memory allocation/freeing in the remote pageset after > >> some time (3 seconds for now), the remote pageset will be drained to > >> avoid memory wastage. > >> > >> But in the current implementation, vmstat updater worker may not be > >> re-queued when we are waiting for the timeout (pcp->expire != 0) if > >> there are no vmstat changes, for example, when CPU goes idle. > > > > Why is that a problem? > > The pages of the remote zone may be kept in the local per-CPU pageset > for long time as long as there's no page allocation/freeing on the > logical CPU. In addition to the logical CPU goes idle, this is also > possible if the logical CPU is busy in the user space. But why is this a problem? Is the scale of the problem sufficient to trigger out of memory situations or be otherwise harmful? -- Michal Hocko SUSE Labs