def METHOD_NAME(self):
    '''
    Sets all the reqd parameter and also
    mounts the tmpfs to be used in test.
    '''
    # Set params as per available memory in system
    self.mem_path = self.params.get(
        "t_dir", default=os.path.join(data_dir.get_tmp_dir(), 'thp_space'))
    free_mem = self.params.get(
        "mem_size", default=memory.meminfo.MemFree.m)
    self.dd_timeout = self.params.get("dd_timeout", default=900)
    self.thp_split = None
    try:
        memory.read_from_vmstat("thp_split_page")
        self.thp_split = "thp_split_page"
    except IndexError:
        self.thp_split = "thp_split"
    # Set block size as hugepage size * 2
    self.block_size = memory.meminfo.Hugepagesize.m * 2
    self.count = free_mem // self.block_size
    # Mount device as per free memory size
    if not os.path.exists(self.mem_path):
        os.makedirs(self.mem_path)
    self.device = Partition(device="none", mountpoint=self.mem_path)
    self.device.mount(mountpoint=self.mem_path, fstype="tmpfs",
                      args='-o size=%dM' % free_mem, mnt_check=False)