forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'for-linus-v4.8' of git://github.com/martinbrandenburg/linux
Pull orangefs update from Martin Brandenburg: "Kernel side caching and executable bugfix This allows OrangeFS to utilize the dcache and adds an in kernel attribute cache. We previously used the user side client for this purpose. We see a modest performance increase on small file operations. For example, without the cache, compiling coreutils takes about 17 minutes. With the patch and a 50 millisecond timeout for dcache_timeout_msecs and getattr_timeout_msecs (the default), compiling coreutils takes about 6 minutes 20 seconds. On the same hardware, compiling coreutils on an xfs filesystem takes 90 seconds. We see similar improvements with mdtest and a test involving writing, reading, and deleting a large number of small files. Interested parties can review more data at the following URL. https://docs.google.com/spreadsheets/d/1v4aUeppKexIbRMz_Yn9k4eaM3uy2KCaPoe_93YKWOtA/pubhtml The eventual goal of this is to allow getdents to turn into a readdirplus to the OrangeFS server. The cache will be filled then, which should provide a performance benefit to the common case of readdir followed by getattr on each entry (i.e. ls -l). This also fixes a bug. When orangefs_inode_permission was added, it did not collect i_size from the OrangeFS server, since this presses an unnecessary load on the OrangeFS server. However, it left a case where i_size is never initialized. Then running an executable could fail. With this patch, size is always collected to be inserted into the cache. Thus the bug disappears. If this patch is not accepted during this merge window, we will send a one-line band-aid for this bug instead" * tag 'for-linus-v4.8' of git://github.com/martinbrandenburg/linux: Orangefs: update orangefs.txt orangefs: Account for jiffies wraparound. orangefs: Change default dcache and getattr timeout to 50 msec. orangefs: Allow dcache and getattr cache time to be configured. orangefs: Cache getattr results. orangefs: Use d_time to avoid excessive lookups
- Loading branch information
Showing
9 changed files
with
135 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,10 +61,21 @@ | |
* Slots are requested and waited for, | ||
* the wait times out after slot_timeout_secs. | ||
* | ||
* What: /sys/fs/orangefs/dcache_timeout_msecs | ||
* Date: Jul 2016 | ||
* Contact: Martin Brandenburg <[email protected]> | ||
* Description: | ||
* Time lookup is valid in milliseconds. | ||
* | ||
* What: /sys/fs/orangefs/getattr_timeout_msecs | ||
* Date: Jul 2016 | ||
* Contact: Martin Brandenburg <[email protected]> | ||
* Description: | ||
* Time getattr is valid in milliseconds. | ||
* | ||
* What: /sys/fs/orangefs/acache/... | ||
* Date: Jun 2015 | ||
* Contact: Mike Marshall <hubcap@omnibond.com> | ||
* Contact: Martin Brandenburg <martin@omnibond.com> | ||
* Description: | ||
* Attribute cache configurable settings. | ||
* | ||
|
@@ -117,6 +128,8 @@ struct orangefs_obj { | |
int perf_history_size; | ||
int perf_time_interval_secs; | ||
int slot_timeout_secs; | ||
int dcache_timeout_msecs; | ||
int getattr_timeout_msecs; | ||
}; | ||
|
||
struct acache_orangefs_obj { | ||
|
@@ -658,6 +671,20 @@ static ssize_t sysfs_int_show(char *kobj_id, char *buf, void *attr) | |
"%d\n", | ||
slot_timeout_secs); | ||
goto out; | ||
} else if (!strcmp(orangefs_attr->attr.name, | ||
"dcache_timeout_msecs")) { | ||
rc = scnprintf(buf, | ||
PAGE_SIZE, | ||
"%d\n", | ||
dcache_timeout_msecs); | ||
goto out; | ||
} else if (!strcmp(orangefs_attr->attr.name, | ||
"getattr_timeout_msecs")) { | ||
rc = scnprintf(buf, | ||
PAGE_SIZE, | ||
"%d\n", | ||
getattr_timeout_msecs); | ||
goto out; | ||
} else { | ||
goto out; | ||
} | ||
|
@@ -734,6 +761,12 @@ static ssize_t int_store(struct orangefs_obj *orangefs_obj, | |
} else if (!strcmp(attr->attr.name, "slot_timeout_secs")) { | ||
rc = kstrtoint(buf, 0, &slot_timeout_secs); | ||
goto out; | ||
} else if (!strcmp(attr->attr.name, "dcache_timeout_msecs")) { | ||
rc = kstrtoint(buf, 0, &dcache_timeout_msecs); | ||
goto out; | ||
} else if (!strcmp(attr->attr.name, "getattr_timeout_msecs")) { | ||
rc = kstrtoint(buf, 0, &getattr_timeout_msecs); | ||
goto out; | ||
} else { | ||
goto out; | ||
} | ||
|
@@ -1361,6 +1394,12 @@ static struct orangefs_attribute op_timeout_secs_attribute = | |
static struct orangefs_attribute slot_timeout_secs_attribute = | ||
__ATTR(slot_timeout_secs, 0664, int_orangefs_show, int_store); | ||
|
||
static struct orangefs_attribute dcache_timeout_msecs_attribute = | ||
__ATTR(dcache_timeout_msecs, 0664, int_orangefs_show, int_store); | ||
|
||
static struct orangefs_attribute getattr_timeout_msecs_attribute = | ||
__ATTR(getattr_timeout_msecs, 0664, int_orangefs_show, int_store); | ||
|
||
static struct orangefs_attribute perf_counter_reset_attribute = | ||
__ATTR(perf_counter_reset, | ||
0664, | ||
|
@@ -1382,6 +1421,8 @@ static struct orangefs_attribute perf_time_interval_secs_attribute = | |
static struct attribute *orangefs_default_attrs[] = { | ||
&op_timeout_secs_attribute.attr, | ||
&slot_timeout_secs_attribute.attr, | ||
&dcache_timeout_msecs_attribute.attr, | ||
&getattr_timeout_msecs_attribute.attr, | ||
&perf_counter_reset_attribute.attr, | ||
&perf_history_size_attribute.attr, | ||
&perf_time_interval_secs_attribute.attr, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters