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 B7B91EB64DD for ; Thu, 3 Aug 2023 14:56:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236182AbjHCO4C (ORCPT ); Thu, 3 Aug 2023 10:56:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235977AbjHCOz6 (ORCPT ); Thu, 3 Aug 2023 10:55:58 -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 89CBA173F; Thu, 3 Aug 2023 07:55:57 -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 4C0E21F747; Thu, 3 Aug 2023 14:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1691074556; 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=/VNlnAgBc91S2tYQvLwrXhvlLqKeVtz0vo49rvSQNPE=; b=kVP0di1gzsJsEBbQQkq4/uiFNVNskhJjfzgyi/9R6Qhac7n1+AnbpJ3GFGHXK1e+0/sDW6 sq63HRQ8VLd7ptKuupjYjswPoJqTloEdleyab3q5EYZ4DzgBIi9l/Py/OhKsDxNCtMEd3n 8pBrxdzb8ugos/N86bbFPaoIGR7Bv4s= 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 27E03134B0; Thu, 3 Aug 2023 14:55:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id orjIBvy/y2SwHwAAMHmgww (envelope-from ); Thu, 03 Aug 2023 14:55:56 +0000 Date: Thu, 3 Aug 2023 16:55:55 +0200 From: Michal Hocko To: Yosry Ahmed Cc: Johannes Weiner , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v3] mm: memcg: use rstat for non-hierarchical stats Message-ID: References: <20230726153223.821757-1-yosryahmed@google.com> <20230726153223.821757-2-yosryahmed@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 02-08-23 15:02:55, Yosry Ahmed wrote: [...] > Let me know if the testing is satisfactory for you. I can send an > updated commit log accordingly with a summary of this conversation. Yes this should be sufficient as it exercises all the CPUs so the overhead in flushing should be visible if this was a real deal. I would have gone with kernel build test as that has a broader code coverage but this artificial test should give some red flags as well. So good enough. Amending the changelog with this would be helpful as well so that future us and others will know what kind of testing has been done. Acked-by: Michal Hocko > > > > -- > > > Michal Hocko > > > SUSE Labs > #!/bin/bash > > NR_CPUS=$(getconf _NPROCESSORS_ONLN) > NR_CGROUPS=$(( NR_CPUS * 2 )) > TEST_MB=50 > TOTAL_MB=$((TEST_MB * NR_CGROUPS)) > TMPFS=$(mktemp -d) > ROOT="/sys/fs/cgroup/" > ZRAM_DEV="/mnt/devtmpfs/zram0" > > cleanup() { > umount $TMPFS > rm -rf $TMPFS > for i in $(seq $NR_CGROUPS); do > cgroup="$ROOT/cg$i" > rmdir $cgroup > done > swapoff $ZRAM_DEV > echo 1 > "/sys/block/zram0/reset" > } > trap cleanup INT QUIT EXIT > > # Setup zram > echo $((TOTAL_MB << 20)) > "/sys/block/zram0/disksize" > mkswap $ZRAM_DEV > swapon $ZRAM_DEV > echo "Setup zram done" > > # Create cgroups, set limits > echo "+memory" > "$ROOT/cgroup.subtree_control" > for i in $(seq $NR_CGROUPS); do > cgroup="$ROOT/cg$i" > mkdir $cgroup > echo $(( (TEST_MB << 20) / 4)) > "$cgroup/memory.max" > done > echo "Setup cgroups done" > > # Start workers to allocate tmpfs memory > mount -t tmpfs none $TMPFS > for i in $(seq $NR_CGROUPS); do > cgroup="$ROOT/cg$i" > f="$TMPFS/tmp$i" > (echo 0 > "$cgroup/cgroup.procs" && > dd if=/dev/zero of=$f bs=1M count=$TEST_MB status=none && > cat $f > /dev/null)& > done > > # Wait for workers > wait -- Michal Hocko SUSE Labs