Skip to content

Commit

Permalink
GPUDirect Storage kernel driver (nvidia-fs) ver-2.17.0 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
KiranModukuri committed Jun 29, 2023
1 parent 6a5a2d4 commit 3670962
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
nvidia-fs (2.17.0) RELEASE; urgency=low
* fixed compilations issues wth linux ver 6.x kernels
-- June 2023
nvidia-fs (2.16.1) RELEASE; urgency=low
* no changes
-- June 2023
nvidia-fs (2.15.3) RELEASE; urgency=low
* fixed failures in nvme_queue_rqs API when nvfs_nvidia_p2p_dma_map_pages can suspend during dma_map_pages call
* fix memory leak in shadow pages due to missing unpin_user_page call
Expand Down
33 changes: 33 additions & 0 deletions src/configure
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,39 @@ if compile_prog "Checking if pin_user_pages_fast symbol is present in kernel or
output_sym "HAVE_PIN_USER_PAGES_FAST"
fi

cat > $TEST_C <<EOF
#include <linux/random.h>
#include "test.h"
int test (void)
{
unsigned int temp = prandom_u32();
return 0;
}
EOF
if compile_prog "Checking if prandom_u32 symbol is present in kernel or not ..."; then
output_sym "HAVE_PRANDOM_U32"
fi

cat > $TEST_C <<EOF
#include "test.h"
#include <linux/device.h>
static char *temp_devnode(struct device *dev, umode_t *mode)
{
return NULL;
}
int test (void)
{
struct class *temp;
temp->devnode = temp_devnode;
return 0;
}
EOF
if compile_prog "Checking if devnode in class has doesn't have const device or not ..."; then
output_sym "HAVE_NO_CONST_DEVICE_IN_DEVNODE"
fi

echo "#endif" >> $config_host_h
rm -rf build

4 changes: 4 additions & 0 deletions src/nvfs-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2378,7 +2378,11 @@ struct file_operations nvfs_dev_fops = {
.owner = THIS_MODULE,
};

#ifdef HAVE_NO_CONST_DEVICE_IN_DEVNODE
static char *nvfs_devnode(struct device *dev, umode_t *mode)
#else
static char *nvfs_devnode(const struct device *dev, umode_t *mode)
#endif
{
if (!mode)
return NULL;
Expand Down
6 changes: 5 additions & 1 deletion src/nvfs-mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,12 @@ static int nvfs_mgroup_mmap_internal(struct file *filp, struct vm_area_struct *v
spin_lock(&lock);
tries = 10;
do {
#ifdef HAVE_PRANDOM_U32
base_index = NVFS_MIN_BASE_INDEX + (unsigned long)prandom_u32();
nvfs_mgroup = nvfs_mgroup_get_unlocked(base_index);
#else
base_index = NVFS_MIN_BASE_INDEX + (unsigned long)get_random_u32();
#endif
nvfs_mgroup = nvfs_mgroup_get_unlocked(base_index);
if (unlikely(nvfs_mgroup && tries--)) {
nvfs_mgroup_put(nvfs_mgroup);
continue;
Expand Down
4 changes: 2 additions & 2 deletions src/nvfs-vers.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@

#define NVFS_DRIVER_MAJOR_VERSION 2 //2-bytes

#define NVFS_DRIVER_MINOR_VERSION 15 //2-bytes
#define NVFS_DRIVER_MINOR_VERSION 17 //2-bytes

// template for build version
#define NVFS_DRIVER_PATCH_VERSION 3
#define NVFS_DRIVER_PATCH_VERSION 0

static inline unsigned int nvfs_driver_version(void) {
return (NVFS_DRIVER_MAJOR_VERSION << 16) | NVFS_DRIVER_MINOR_VERSION;
Expand Down

0 comments on commit 3670962

Please sign in to comment.