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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ED8BCF043C for ; Wed, 9 Oct 2024 03:59:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A3A4C6B0095; Tue, 8 Oct 2024 23:59:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C43A6B009B; Tue, 8 Oct 2024 23:59:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 865706B00B8; Tue, 8 Oct 2024 23:59:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 64B376B0095 for ; Tue, 8 Oct 2024 23:59:55 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id F1476ABC40 for ; Wed, 9 Oct 2024 03:59:50 +0000 (UTC) X-FDA: 82652710308.25.F4237F4 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf12.hostedemail.com (Postfix) with ESMTP id 3C6F540002 for ; Wed, 9 Oct 2024 03:59:51 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=none; spf=pass (imf12.hostedemail.com: domain of linyunsheng@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=linyunsheng@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728446257; 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; bh=ZoETwgNqekhqVqWUX3TJp1zAQJIhWjsFrSLF0oWXHe0=; b=ZLjtXFJ2zGA/TudMZMvn/E0UYcq9iNHQpfyziHjjPbZqAQDLjSgdUF8yYVeosIuG/vK60j APMqap4MRC/icAQq1gA2f1TshI1qid3rHMQC31tsRkfFCkN8jEmH9bmJIbidXqJioyR57L EE13WCyh+NwqQQDfsTeWfQ1ytUf1tMU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728446257; a=rsa-sha256; cv=none; b=Nw+Bt/VUE7BsRtwxK5ENKfBsiQJxTEzJsUS07DY28T8W1V7Gx7VSJvb+9dJCVjcfDXJMsO sv/wGHxy5BXmg1RWdJ4PNDFeQGjUEeexhPvhPRx9J6uGEThFdeWNXho9UYAz/G/AbmsR8A Yl/sharzGhXTHKC+qyfJw9Ia3u4ORPM= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=none; spf=pass (imf12.hostedemail.com: domain of linyunsheng@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=linyunsheng@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4XNfDv1jVTz1HKh7; Wed, 9 Oct 2024 11:55:43 +0800 (CST) Received: from dggpemf200006.china.huawei.com (unknown [7.185.36.61]) by mail.maildlp.com (Postfix) with ESMTPS id A47E9140134; Wed, 9 Oct 2024 11:59:48 +0800 (CST) Received: from [10.67.120.129] (10.67.120.129) by dggpemf200006.china.huawei.com (7.185.36.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 9 Oct 2024 11:59:48 +0800 Message-ID: Date: Wed, 9 Oct 2024 11:59:47 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v20 01/14] mm: page_frag: add a test module for page_frag To: Shuah Khan , , , CC: , , Alexander Duyck , Alexander Duyck , Andrew Morton , Shuah Khan , , References: <20241008112049.2279307-1-linyunsheng@huawei.com> <20241008112049.2279307-2-linyunsheng@huawei.com> Content-Language: en-US From: Yunsheng Lin In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.120.129] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemf200006.china.huawei.com (7.185.36.61) X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 3C6F540002 X-Stat-Signature: zxg7si3fnxugs5opbxepxmhhy7ejhn3y X-HE-Tag: 1728446391-604905 X-HE-Meta: U2FsdGVkX1+1DILZbYS7u65l3EabjZjyM/4yvkKFdFVfmr4k7wAUq3KGD9avc64kpxdcspFcbEfP4IpPYGvxKrKz1QGpgV6FZMLgaGe83naAifB8IRDqpMMCdSqt8KyOfYDiB7rpOUb+JRkk+DzW2GfExJwOX/O8jadE+zYpndYcLBVQbnPpSQo4TVKBlpLnFTKk2ZD3UIoRbmq2kwZc9ZE8mm9tUuqgE8IkN6MLA3NEeOUYxfhWhOAReteQ4RAIfTr75mEisxzMTfGFmHKXyFXM6jSnk8eFTgYuGbLEtpoOEaSTcTgCSWJ1HEZ8wm0ql/Q3gQi1MwU4qlvU3rz9ezJUKapMr5FWIrTJvkGksU5DkmHqsgjgELZDeSOnVayevi5rknVeLT180SUQsZSCrkqyDWyKAXmWTC6a+0siICvYE54OI6uPo22CCqsUVwzP2cH0qYZr+d7jWf1ehVI48WGTbt0syY65+N/FbuI0rctEByq8Bo0TWTcPVlyKe5utUHUXFR+5wkQWgjP5mRzf+GpGOgEmaLrUzuyqEsAMMb8Nqp8rKyBExtjGcx4tOen/T9nwTuMRSQb8vQ80zdlEJsK6SUX669OE2vOUDoDND7YRf1MXIAEQsPct3HiTH884qCKLT9NVsIIQV7gHZHBwnPllE18w8MZP3dJDIUeOjOEfPcOX5oePHCJeDGQWX6NhlWkE86eP8gBQlIZ5B6HeO9UbhX+ShqrdPe/TWgiOkPJlSsUv+vOOWrmN7oXNjGweqsHxrRLf6uMI4c5pcx6BN6jOW9KiNzrQQZQP6BJ8eAnmxVmI/LOARIA7Lhac3B5t1KPRYHs1MO17IhQ7Mt/el+x3B2Ngu1ErgG6HeKiFzyACXMlUyQveCkPlw4zXlaswPi9PFw4hwnhVZwCqPSHS+YL4YJX9GprowPDfrztAw9k8BJMOGrCnjC3dq0imltZQPZgF7AqU8ZS5eCj6S5b hB/k3BY2 CbZrdPucTu893NovDzf8ccJdqTEN3QjH6ycYUUCwUaqx8vGvouwz+OJbaz+N+sSDNGruB7R9NjK7J5KmrgptpzGsNr3DXuFo137a6zqpHc6C7IGhHZz8GPBMmdWFtNn9QwAdkv+mJFrAnjnJqoI9CcdhVQMmhzG6ywvXoynkCDzLjzzDDYuHK1Cd4OUWPVcF/HfQknpSRoANlSjf+hVl/9HVBrzHJmGUJM+7yOER8MsevapKBRd0ykuyuIjdWWFJYyqxie9djMRtD0euZOHYhfuMQaExezMJz0C7R2reGwzWD+iBqY7YG579n3TTihBGCyQcZPL9mCPKSXmzGkNfNVT0Q596gxayKSeNaECQWk7FXHgNRQvjMawxd0+ihb51Gy/09HvWcp/CNOg9+hph0VRoOBA== 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: List-Subscribe: List-Unsubscribe: On 2024/10/9 3:56, Shuah Khan wrote: > On 10/8/24 05:20, Yunsheng Lin wrote: >> The testing is done by ensuring that the fragment allocated >> from a frag_frag_cache instance is pushed into a ptr_ring >> instance in a kthread binded to a specified cpu, and a kthread >> binded to a specified cpu will pop the fragment from the >> ptr_ring and free the fragment. >> >> CC: Alexander Duyck >> Signed-off-by: Yunsheng Lin >> Reviewed-by: Alexander Duyck > > Signed-off-by should be last. Same comment on all the other Hi, Shuah I used 'git am' to collect those tag, it seems that is the order the tool applied, and I checking other applied commit, it seems only Signed-off-by from the committer is the last, like the below recent mm commit: 6901cf55de22 ff7f5ad7bce4 > patches in this series. When you have 4 patches, it is a good > practice to add cover-letter. I guess the cover-letter meant below? https://lore.kernel.org/all/20241008112049.2279307-1-linyunsheng@huawei.com/ > >> --- >>   tools/testing/selftests/mm/Makefile           |   3 + >>   tools/testing/selftests/mm/page_frag/Makefile |  18 ++ >>   .../selftests/mm/page_frag/page_frag_test.c   | 173 ++++++++++++++++++ >>   tools/testing/selftests/mm/run_vmtests.sh     |   8 + >>   tools/testing/selftests/mm/test_page_frag.sh  | 171 +++++++++++++++++ >>   5 files changed, 373 insertions(+) >>   create mode 100644 tools/testing/selftests/mm/page_frag/Makefile >>   create mode 100644 tools/testing/selftests/mm/page_frag/page_frag_test.c >>   create mode 100755 tools/testing/selftests/mm/test_page_frag.sh >> >> diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile >> index 02e1204971b0..acec529baaca 100644 >> --- a/tools/testing/selftests/mm/Makefile >> +++ b/tools/testing/selftests/mm/Makefile >> @@ -36,6 +36,8 @@ MAKEFLAGS += --no-builtin-rules >>   CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) $(TOOLS_INCLUDES) >>   LDLIBS = -lrt -lpthread -lm >>   +TEST_GEN_MODS_DIR := page_frag >> + >>   TEST_GEN_FILES = cow >>   TEST_GEN_FILES += compaction_test >>   TEST_GEN_FILES += gup_longterm >> @@ -126,6 +128,7 @@ TEST_FILES += test_hmm.sh >>   TEST_FILES += va_high_addr_switch.sh >>   TEST_FILES += charge_reserved_hugetlb.sh >>   TEST_FILES += hugetlb_reparenting_test.sh >> +TEST_FILES += test_page_frag.sh >>     # required by charge_reserved_hugetlb.sh >>   TEST_FILES += write_hugetlb_memory.sh >> diff --git a/tools/testing/selftests/mm/page_frag/Makefile b/tools/testing/selftests/mm/page_frag/Makefile >> new file mode 100644 >> index 000000000000..58dda74d50a3 >> --- /dev/null >> +++ b/tools/testing/selftests/mm/page_frag/Makefile >> @@ -0,0 +1,18 @@ >> +PAGE_FRAG_TEST_DIR := $(realpath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))) >> +KDIR ?= $(abspath $(PAGE_FRAG_TEST_DIR)/../../../../..) >> + >> +ifeq ($(V),1) >> +Q = >> +else >> +Q = @ >> +endif >> + >> +MODULES = page_frag_test.ko >> + >> +obj-m += page_frag_test.o >> + >> +all: >> +    +$(Q)make -C $(KDIR) M=$(PAGE_FRAG_TEST_DIR) modules >> + >> +clean: >> +    +$(Q)make -C $(KDIR) M=$(PAGE_FRAG_TEST_DIR) clean >> diff --git a/tools/testing/selftests/mm/page_frag/page_frag_test.c b/tools/testing/selftests/mm/page_frag/page_frag_test.c >> new file mode 100644 >> index 000000000000..eeb2b6bc681a >> --- /dev/null >> +++ b/tools/testing/selftests/mm/page_frag/page_frag_test.c >> @@ -0,0 +1,173 @@ >> +// SPDX-License-Identifier: GPL-2.0 > > I think this would throw a checkpatch warning about > comment should be "/*" and not "//" using "git grep 'SPDX-License' mm", "//" seems like a more common case. And I did using './scripts/checkpatch.pl --strict --codespell', and it does not throw a checkpatch warning. >> + >> +/* >> + * Test module for page_frag cache >> + * ... >> +function run_manual_check() >> +{ >> +    # >> +    # Validate passed parameters. If there is wrong one, >> +    # the script exists and does not execute further. >> +    # >> +    validate_passed_args $@ >> + >> +    echo "Run the test with following parameters: $@" > > Is this marker good enough to isolate the test results in the > dmesg? Include the test name in the message. > > >> +    insmod $DRIVER $@ > /dev/null 2>&1 >> +    echo "Done." > > Is this marker good enough to isolate the test results in the > dmesg? Include the test name in the message. > >> +    echo "Check the kernel ring buffer to see the summary." > > Usually the test would run dmesg and filter out the test results > from the dmesg and include them in the test script output. > > You can refer to other tests that do that: powerpc/scripts/hmi.sh > is one example. Thanks, will check that.