linux/lib/test_vmalloc.c

// SPDX-License-Identifier: GPL-2.0

/*
 * Test module for stress and analyze performance of vmalloc allocator.
 * (C) 2018 Uladzislau Rezki (Sony) <[email protected]>
 */
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/vmalloc.h>
#include <linux/random.h>
#include <linux/kthread.h>
#include <linux/moduleparam.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/rwsem.h>
#include <linux/mm.h>
#include <linux/rcupdate.h>
#include <linux/slab.h>

#define __param(type, name, init, msg)				\

__param();

__param();

__param();

__param();

__param();

__param();

__param();

/*
 * Read write semaphore for synchronization of setup
 * phase that is done in main thread and workers.
 */
static DECLARE_RWSEM(prepare_for_test_rwsem);

/*
 * Completion tracking for worker threads.
 */
static DECLARE_COMPLETION(test_all_done_comp);
static atomic_t test_n_undone =;

static inline void
test_report_one_done(void)
{}

static int random_size_align_alloc_test(void)
{}

/*
 * This test case is supposed to be failed.
 */
static int align_shift_alloc_test(void)
{}

static int fix_align_alloc_test(void)
{}

static int random_size_alloc_test(void)
{}

static int long_busy_list_alloc_test(void)
{}

static int full_fit_alloc_test(void)
{}

static int fix_size_alloc_test(void)
{}

static int
pcpu_alloc_test(void)
{}

struct test_kvfree_rcu {};

static int
kvfree_rcu_1_arg_vmalloc_test(void)
{}

static int
kvfree_rcu_2_arg_vmalloc_test(void)
{}

static int
vm_map_ram_test(void)
{}

struct test_case_desc {};

static struct test_case_desc test_case_array[] =;

struct test_case_data {};

static struct test_driver {} *tdriver;

static void shuffle_array(int *arr, int n)
{}

static int test_func(void *private)
{}

static int
init_test_configuration(void)
{}

static void do_concurrent_test(void)
{}

static int vmalloc_test_init(void)
{}

module_init(vmalloc_test_init)

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();