From patchwork Wed Apr 12 16:43:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13209355 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 7E1B5C77B6E for ; Wed, 12 Apr 2023 16:43:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1C8F8280003; Wed, 12 Apr 2023 12:43:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A0A1280001; Wed, 12 Apr 2023 12:43:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0411C280003; Wed, 12 Apr 2023 12:43:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id EA19D280001 for ; Wed, 12 Apr 2023 12:43:46 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A2F89A01A4 for ; Wed, 12 Apr 2023 16:43:46 +0000 (UTC) X-FDA: 80673310452.03.86FDDEA Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf30.hostedemail.com (Postfix) with ESMTP id 593808001A for ; Wed, 12 Apr 2023 16:43:44 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=YkZpH81m; spf=pass (imf30.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681317824; 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:dkim-signature; bh=y3C20L7q6E0jI4D7x0NRqCKUvj6UY8rhbxmq4jIDbcM=; b=d8/0yfmloYiuhTab0ic/1QohIRiiLlpV9tUZJgpt1jPHkQmggILY+muWZmF7CBBidwPOQB 0zbQF21n2264vRUigl/mc6Npa8OXvZtw3rzSq4BNU5567mO+86I0UQbq3xXbY1k0Y3mNF4 K960C6KYEH/FDwMtjG5h4eqvrJWS+gY= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=YkZpH81m; spf=pass (imf30.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681317824; a=rsa-sha256; cv=none; b=E4P3vGGjhzsHO2t3nnuBCIfsHRvlOMTyCvr+AQggDFvbWZj4UF1MXCfFXuZmVMs0hf9WTS Jn5Sk/jP9PhqgnxLjz7Ty7PYfIx3De+CLdMRMtbiOUDbpZ6luUe8nryDAmD6X9LgeV2YQt 1UO5rcKhtuV8DIX31VHxWENYMtARWac= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681317823; h=from:from: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=y3C20L7q6E0jI4D7x0NRqCKUvj6UY8rhbxmq4jIDbcM=; b=YkZpH81mCnnk94QQdaCE1Kd6EE1r2BsT7cg1OGfM2/ah3D49OkZiRI5MlmuE6fGJgju1qS vCTvzIBcnkbmgqvzRohx9jZAjBZaSdu/x6No1cENbWVCc88h2ac3pC9DzM3qk18bJTUrkl kWRILQF1x2IeAJxCoD13m1PNN0sygsI= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-448-PjolhF0OPu2ErAgY8vaaZg-1; Wed, 12 Apr 2023 12:43:42 -0400 X-MC-Unique: PjolhF0OPu2ErAgY8vaaZg-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-3e947d81d7dso267931cf.1 for ; Wed, 12 Apr 2023 09:43:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681317822; x=1683909822; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y3C20L7q6E0jI4D7x0NRqCKUvj6UY8rhbxmq4jIDbcM=; b=bfJjbF14Ews/9qnMioVzX3zquelrPwlV5vBsiZM7hmxH8G3wNRjLe2c6RjWoPVh6tg T0btR27/5cZ4OqNqjI/KBs+vC4NnCMPLHg0Kpt4yENMUPLdU7e0zxOaUxAmac5mB9VOV SQwcPU9/PYzvv/t0MFRr9Kv1cV/bTOdd3KF7DQsJggCU/kz6sTAblcR8Hs4cn5P5k3mZ XdwSFHM6D2LQHN4sisen9MWk7PgsakFGCANCkStzH6x6Q0ErH2EZlutk3jgkhnJEdEb/ 48nRXX+TeBZcnZGfKC7h7Sr/yjgB10qcj5oQXsbGhuJlUR5xV8Toc9Nmitp9eiSJrm2Q SGOA== X-Gm-Message-State: AAQBX9erq0VxBcLhoRkVNOcVCkSIpLH903lX4RRtLR6aNdzJ/A9ZchVf hyTGAFr622e6/7yfJWczU94K691Z9JBNBN+Sv9lHVekGpmSVaHzKsK2D0lEklK5d551KKzqbfDp qPSwFOC8LAhI= X-Received: by 2002:a05:622a:14cf:b0:3bf:cf77:a861 with SMTP id u15-20020a05622a14cf00b003bfcf77a861mr4120221qtx.4.1681317821788; Wed, 12 Apr 2023 09:43:41 -0700 (PDT) X-Google-Smtp-Source: AKy350bS0H0y2MXWTHEdCzjaxChBZetPVl11/ilu2oRzLKkLGeeR4cj9iwfLJ5Lhe5q6n8VH3atofw== X-Received: by 2002:a05:622a:14cf:b0:3bf:cf77:a861 with SMTP id u15-20020a05622a14cf00b003bfcf77a861mr4120195qtx.4.1681317821429; Wed, 12 Apr 2023 09:43:41 -0700 (PDT) Received: from x1n.redhat.com (bras-base-aurron9127w-grc-40-70-52-229-124.dsl.bell.ca. [70.52.229.124]) by smtp.gmail.com with ESMTPSA id b15-20020ac8678f000000b003e38e2815a5sm4328106qtp.22.2023.04.12.09.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 09:43:40 -0700 (PDT) From: Peter Xu To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: David Hildenbrand , Andrew Morton , Leonardo Bras Soares Passos , peterx@redhat.com, Andrea Arcangeli , Nadav Amit , Mike Rapoport , Axel Rasmussen , Mike Kravetz , Mike Rapoport Subject: [PATCH v2 19/31] selftests/mm: Rename uffd_stats to uffd_args Date: Wed, 12 Apr 2023 12:43:37 -0400 Message-Id: <20230412164337.328607-1-peterx@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230412163922.327282-1-peterx@redhat.com> References: <20230412163922.327282-1-peterx@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Rspamd-Queue-Id: 593808001A X-Stat-Signature: tieyfhupmh5ofkguushqnxu1uewdrtqu X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1681317824-219450 X-HE-Meta: U2FsdGVkX19sJ99xcTCfI84rHNzKe42qbm6ZT8hmX1t9Xc+eePriikropwCK+hJ18ajrap2B13jjv3QRhUAsmjRvRRE7s4gq6J917LZGq5+0W43QcB06DrfREpFpAr5MLiq26f45RjPuXI+9pQx8r+OkiDN8/YJkk0TkZU1v1FjAmi5DKg+8aaEOnUJ6dKRvTSCz6tJ+jTbDO8wk6ESC82EG71M07eDVn9PfLPWjkrn679tRtc0efyrHp9TPNk3mSG2gejtXF9Tr/ih9scmC3Th03z1KH4GZJXSlRUnMYDw/h8MZaKYZYBiCoX40HtnYGw3u3zMBfu63WfPO4M87EkkPOTlOeEKZmrNh7WAGAnn9lh21ZfJHa5ZgoMsuLqZbRr53HdweC3OUfmApcqI+P7PD3/fKc2w6p/Sl0awT+g5QxqKOuz58fFIh3JWPAentCH0RBUQW+VCX/9nFtpXTsa9nTO6cqfACma9r1g7m03KchV2TC3ZjWfeUy6P371n2OhGKxIL/lMXXDcvqt/6NlixgLYfDLJ+2eDPoo+x/wugIKiOpDkYBKHF69GGm55Wx/ZoRu2jcedwx2NCsNErFvfHjeA0Aj1FWoymuhwbIBmq5F6o4J8Jw5+JFmBV3eNJZrt5wZnI1ddmwBgh9+MB3shmy60PtR8RVbNEKIZ+6yNQw56P2CVasLRjnQc1dhSkOQSH8Y4yfKSsjed0IfZO26tIXjuPbsviduSgqMf/AJgUd1RgScqaki3B0G8V1VLCg7AHDUcfzRFoa1vxW/ON8pu6w76kViXWD6xjB+Cvt29MWOrtkn5+9DRw4e3+h/RA1jpXi7Xx1uzbFyMBO3N02PnafJzknSVeeM4pdTgw3TuWfIz0I72G0y7MJj8yJkWZOVdL3DEdfiftZLuv3Vq36y6Pneb+OJCZi31vxkt3xaSLzOe3ljaUBI2eF8srEEJN9NRihXe8svrgPogISxTe jooiwX2j ZDMkEnNo1832+s948zyPkQRqwyZIn/6iA8BpC9GQXeukXwosG3A8kZp4ZgccbeZc0y2N2fyGS5iilakrUSjm0Ai6wtO1yAiRK7nIOGx5F012GPy8WhCR7+jt0uiyAEBfbZHRNPLlFtqAc5xe+H8gvFtooSgieW9uMjaKGHMwhXDYPn+m09KgPMxuSfUSBnPr0QJqE1qyMXCyFXs+AkYV/oRVWiie3fYwSfVjQRtxOrBMOc/PD10M4bmhymACj5AOGjQyepwAMz3NA3ua0SFh3XSLL5rH7a/Ez9chzQXuF8RsKS+MBbqpBHtb/dUP8iqrU7evST8X58lF2cL1AWakRzxWb+OqgkvOvzNYGVVwwnbjUCbvVcBmwOzfv6nplkt/2qmu5gywxMQiudE556UbQsRKdKltLUM6A/zZK4AGCawvmdWAXWaOwx1fOOcvUy3ML7wF33BZCRQ7By+jzZg+J6exzL0Ng+kO232RcBhG/a66Yk5WkXFvMmDfzGmFeS//yGKNuKQO5h+xmSYZJnBUR22d9YCm78WUZom9dUY/5QRxWexwR9Y+Z1C7zuQOQS7z8/Z57esxbY50LUrs= 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: Prepare for adding more fields into the struct. Suggested-by: Mike Rapoport (IBM) Signed-off-by: Peter Xu Reviewed-by: Mike Rapoport (IBM) --- tools/testing/selftests/mm/uffd-common.c | 28 ++++++------- tools/testing/selftests/mm/uffd-common.h | 6 +-- tools/testing/selftests/mm/uffd-stress.c | 51 ++++++++++++------------ 3 files changed, 42 insertions(+), 43 deletions(-) diff --git a/tools/testing/selftests/mm/uffd-common.c b/tools/testing/selftests/mm/uffd-common.c index f02dfcf10714..e746405aa8f3 100644 --- a/tools/testing/selftests/mm/uffd-common.c +++ b/tools/testing/selftests/mm/uffd-common.c @@ -186,34 +186,34 @@ struct uffd_test_ops hugetlb_uffd_test_ops = { .check_pmd_mapping = NULL, }; -void uffd_stats_report(struct uffd_stats *stats, int n_cpus) +void uffd_stats_report(struct uffd_args *args, int n_cpus) { int i; unsigned long long miss_total = 0, wp_total = 0, minor_total = 0; for (i = 0; i < n_cpus; i++) { - miss_total += stats[i].missing_faults; - wp_total += stats[i].wp_faults; - minor_total += stats[i].minor_faults; + miss_total += args[i].missing_faults; + wp_total += args[i].wp_faults; + minor_total += args[i].minor_faults; } printf("userfaults: "); if (miss_total) { printf("%llu missing (", miss_total); for (i = 0; i < n_cpus; i++) - printf("%lu+", stats[i].missing_faults); + printf("%lu+", args[i].missing_faults); printf("\b) "); } if (wp_total) { printf("%llu wp (", wp_total); for (i = 0; i < n_cpus; i++) - printf("%lu+", stats[i].wp_faults); + printf("%lu+", args[i].wp_faults); printf("\b) "); } if (minor_total) { printf("%llu minor (", minor_total); for (i = 0; i < n_cpus; i++) - printf("%lu+", stats[i].minor_faults); + printf("%lu+", args[i].minor_faults); printf("\b)"); } printf("\n"); @@ -397,7 +397,7 @@ int uffd_read_msg(int ufd, struct uffd_msg *msg) return 0; } -void uffd_handle_page_fault(struct uffd_msg *msg, struct uffd_stats *stats) +void uffd_handle_page_fault(struct uffd_msg *msg, struct uffd_args *args) { unsigned long offset; @@ -407,7 +407,7 @@ void uffd_handle_page_fault(struct uffd_msg *msg, struct uffd_stats *stats) if (msg->arg.pagefault.flags & UFFD_PAGEFAULT_FLAG_WP) { /* Write protect page faults */ wp_range(uffd, msg->arg.pagefault.address, page_size, false); - stats->wp_faults++; + args->wp_faults++; } else if (msg->arg.pagefault.flags & UFFD_PAGEFAULT_FLAG_MINOR) { uint8_t *area; int b; @@ -430,7 +430,7 @@ void uffd_handle_page_fault(struct uffd_msg *msg, struct uffd_stats *stats) for (b = 0; b < page_size; ++b) area[b] = ~area[b]; continue_range(uffd, msg->arg.pagefault.address, page_size); - stats->minor_faults++; + args->minor_faults++; } else { /* * Missing page faults. @@ -460,14 +460,14 @@ void uffd_handle_page_fault(struct uffd_msg *msg, struct uffd_stats *stats) offset &= ~(page_size-1); if (copy_page(uffd, offset)) - stats->missing_faults++; + args->missing_faults++; } } void *uffd_poll_thread(void *arg) { - struct uffd_stats *stats = (struct uffd_stats *)arg; - unsigned long cpu = stats->cpu; + struct uffd_args *args = (struct uffd_args *)arg; + unsigned long cpu = args->cpu; struct pollfd pollfd[2]; struct uffd_msg msg; struct uffdio_register uffd_reg; @@ -502,7 +502,7 @@ void *uffd_poll_thread(void *arg) err("unexpected msg event %u\n", msg.event); break; case UFFD_EVENT_PAGEFAULT: - uffd_handle_page_fault(&msg, stats); + uffd_handle_page_fault(&msg, args); break; case UFFD_EVENT_FORK: close(uffd); diff --git a/tools/testing/selftests/mm/uffd-common.h b/tools/testing/selftests/mm/uffd-common.h index 47565b2f2dee..f8d2ad178827 100644 --- a/tools/testing/selftests/mm/uffd-common.h +++ b/tools/testing/selftests/mm/uffd-common.h @@ -70,7 +70,7 @@ - 1))) /* Userfaultfd test statistics */ -struct uffd_stats { +struct uffd_args { int cpu; unsigned long missing_faults; unsigned long wp_faults; @@ -98,12 +98,12 @@ extern uffd_test_ops_t shmem_uffd_test_ops; extern uffd_test_ops_t hugetlb_uffd_test_ops; extern uffd_test_ops_t *uffd_test_ops; -void uffd_stats_report(struct uffd_stats *stats, int n_cpus); +void uffd_stats_report(struct uffd_args *args, int n_cpus); void uffd_test_ctx_init(uint64_t features); void userfaultfd_open(uint64_t *features); int uffd_read_msg(int ufd, struct uffd_msg *msg); void wp_range(int ufd, __u64 start, __u64 len, bool wp); -void uffd_handle_page_fault(struct uffd_msg *msg, struct uffd_stats *stats); +void uffd_handle_page_fault(struct uffd_msg *msg, struct uffd_args *args); int __copy_page(int ufd, unsigned long offset, bool retry); int copy_page(int ufd, unsigned long offset); void *uffd_poll_thread(void *arg); diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index 54fc9b4ffa3c..ce7251ab93ef 100644 --- a/tools/testing/selftests/mm/uffd-stress.c +++ b/tools/testing/selftests/mm/uffd-stress.c @@ -90,16 +90,15 @@ static void usage(void) exit(1); } -static void uffd_stats_reset(struct uffd_stats *uffd_stats, - unsigned long n_cpus) +static void uffd_stats_reset(struct uffd_args *args, unsigned long n_cpus) { int i; for (i = 0; i < n_cpus; i++) { - uffd_stats[i].cpu = i; - uffd_stats[i].missing_faults = 0; - uffd_stats[i].wp_faults = 0; - uffd_stats[i].minor_faults = 0; + args[i].cpu = i; + args[i].missing_faults = 0; + args[i].wp_faults = 0; + args[i].minor_faults = 0; } } @@ -163,7 +162,7 @@ pthread_mutex_t uffd_read_mutex = PTHREAD_MUTEX_INITIALIZER; static void *uffd_read_thread(void *arg) { - struct uffd_stats *stats = (struct uffd_stats *)arg; + struct uffd_args *args = (struct uffd_args *)arg; struct uffd_msg msg; pthread_mutex_unlock(&uffd_read_mutex); @@ -172,7 +171,7 @@ static void *uffd_read_thread(void *arg) for (;;) { if (uffd_read_msg(uffd, &msg)) continue; - uffd_handle_page_fault(&msg, stats); + uffd_handle_page_fault(&msg, args); } return NULL; @@ -210,7 +209,7 @@ static void *background_thread(void *arg) return NULL; } -static int stress(struct uffd_stats *uffd_stats) +static int stress(struct uffd_args *args) { unsigned long cpu; pthread_t locking_threads[nr_cpus]; @@ -225,12 +224,12 @@ static int stress(struct uffd_stats *uffd_stats) if (bounces & BOUNCE_POLL) { if (pthread_create(&uffd_threads[cpu], &attr, uffd_poll_thread, - (void *)&uffd_stats[cpu])) + (void *)&args[cpu])) return 1; } else { if (pthread_create(&uffd_threads[cpu], &attr, uffd_read_thread, - (void *)&uffd_stats[cpu])) + (void *)&args[cpu])) return 1; pthread_mutex_lock(&uffd_read_mutex); } @@ -264,7 +263,7 @@ static int stress(struct uffd_stats *uffd_stats) if (write(pipefd[cpu*2+1], &c, 1) != 1) err("pipefd write error"); if (pthread_join(uffd_threads[cpu], - (void *)&uffd_stats[cpu])) + (void *)&args[cpu])) return 1; } else { if (pthread_cancel(uffd_threads[cpu])) @@ -493,7 +492,7 @@ static int userfaultfd_events_test(void) int err, features; pid_t pid; char c; - struct uffd_stats stats = { 0 }; + struct uffd_args args = { 0 }; printf("testing events (fork, remap, remove): "); fflush(stdout); @@ -508,7 +507,7 @@ static int userfaultfd_events_test(void) true, test_uffdio_wp, false)) err("register failure"); - if (pthread_create(&uffd_mon, &attr, uffd_poll_thread, &stats)) + if (pthread_create(&uffd_mon, &attr, uffd_poll_thread, &args)) err("uffd_poll_thread create"); pid = fork(); @@ -526,9 +525,9 @@ static int userfaultfd_events_test(void) if (pthread_join(uffd_mon, NULL)) return 1; - uffd_stats_report(&stats, 1); + uffd_stats_report(&args, 1); - return stats.missing_faults != nr_pages; + return args.missing_faults != nr_pages; } static int userfaultfd_sig_test(void) @@ -538,7 +537,7 @@ static int userfaultfd_sig_test(void) int err, features; pid_t pid; char c; - struct uffd_stats stats = { 0 }; + struct uffd_args args = { 0 }; printf("testing signal delivery: "); fflush(stdout); @@ -557,7 +556,7 @@ static int userfaultfd_sig_test(void) uffd_test_ops->release_pages(area_dst); - if (pthread_create(&uffd_mon, &attr, uffd_poll_thread, &stats)) + if (pthread_create(&uffd_mon, &attr, uffd_poll_thread, &args)) err("uffd_poll_thread create"); pid = fork(); @@ -606,7 +605,7 @@ static int userfaultfd_minor_test(void) unsigned long p; pthread_t uffd_mon; char c; - struct uffd_stats stats = { 0 }; + struct uffd_args args = { 0 }; if (!test_uffdio_minor) return 0; @@ -629,7 +628,7 @@ static int userfaultfd_minor_test(void) page_size); } - if (pthread_create(&uffd_mon, &attr, uffd_poll_thread, &stats)) + if (pthread_create(&uffd_mon, &attr, uffd_poll_thread, &args)) err("uffd_poll_thread create"); /* @@ -645,7 +644,7 @@ static int userfaultfd_minor_test(void) if (pthread_join(uffd_mon, NULL)) return 1; - uffd_stats_report(&stats, 1); + uffd_stats_report(&args, 1); if (test_collapse) { printf("testing collapse of uffd memory into PMD-mapped THPs:"); @@ -664,7 +663,7 @@ static int userfaultfd_minor_test(void) printf(" done.\n"); } - return stats.missing_faults != 0 || stats.minor_faults != nr_pages; + return args.missing_faults != 0 || args.minor_faults != nr_pages; } static int pagemap_open(void) @@ -822,7 +821,7 @@ static int userfaultfd_stress(void) { void *area; unsigned long nr; - struct uffd_stats uffd_stats[nr_cpus]; + struct uffd_args args[nr_cpus]; uint64_t mem_size = nr_pages * page_size; uffd_test_ctx_init(UFFD_FEATURE_WP_UNPOPULATED); @@ -894,10 +893,10 @@ static int userfaultfd_stress(void) */ uffd_test_ops->release_pages(area_dst); - uffd_stats_reset(uffd_stats, nr_cpus); + uffd_stats_reset(args, nr_cpus); /* bounce pass */ - if (stress(uffd_stats)) + if (stress(args)) return 1; /* Clear all the write protections if there is any */ @@ -926,7 +925,7 @@ static int userfaultfd_stress(void) swap(area_src_alias, area_dst_alias); - uffd_stats_report(uffd_stats, nr_cpus); + uffd_stats_report(args, nr_cpus); } if (test_type == TEST_ANON) {