mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-23 23:10:31 +00:00
The use of the VM shrinker was a bad fit for locks. Shrinking a lock requires a round trip with the server to request a null mode. The VM treats the locks like a cache, as expected, which leads to huge amounts of locks accumulating and then being shrank in bulk. This creates a huge backlog of locks making their way through the network conversation with the server that implements invalidating to a null mode and freeing. It starves other network and lock processing, possibly for minutes. This removes the VM shrinker and instead introduces an option that sets a limit on the number of idle locks. As the number of locks exceeds the count we only try to free an oldest lock at each lock call. This results in a lock freeing pace that is proportional to the allocation of new locks by callers and so is throttled by the work done while callers hold locks. It avoids the bulk shrinking of 10s of thousands of locks that we see in the field. Signed-off-by: Zach Brown <zab@versity.com>
32 lines
907 B
C
32 lines
907 B
C
#ifndef _SCOUTFS_OPTIONS_H_
|
|
#define _SCOUTFS_OPTIONS_H_
|
|
|
|
#include <linux/fs.h>
|
|
#include <linux/in.h>
|
|
#include "format.h"
|
|
|
|
struct scoutfs_mount_options {
|
|
u64 data_prealloc_blocks;
|
|
bool data_prealloc_contig_only;
|
|
unsigned int ino_alloc_per_lock;
|
|
int lock_idle_count;
|
|
unsigned int log_merge_wait_timeout_ms;
|
|
char *metadev_path;
|
|
unsigned int orphan_scan_delay_ms;
|
|
int quorum_slot_nr;
|
|
u64 quorum_heartbeat_timeout_ms;
|
|
int tcp_keepalive_timeout_ms;
|
|
};
|
|
|
|
#define UNRESPONSIVE_PROBES 3
|
|
|
|
void scoutfs_options_read(struct super_block *sb, struct scoutfs_mount_options *opts);
|
|
int scoutfs_options_show(struct seq_file *seq, struct dentry *root);
|
|
|
|
int scoutfs_options_early_setup(struct super_block *sb, char *options);
|
|
int scoutfs_options_setup(struct super_block *sb);
|
|
void scoutfs_options_stop(struct super_block *sb);
|
|
void scoutfs_options_destroy(struct super_block *sb);
|
|
|
|
#endif /* _SCOUTFS_OPTIONS_H_ */
|