Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 315760 Details for
Bug 439043
Swap Token issue with RHEL4
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
RHEL4 patch
rhel4.patch (text/plain), 3.73 KB, created by
Michal Schmidt
on 2008-09-04 14:48:46 UTC
(
hide
)
Description:
RHEL4 patch
Filename:
MIME Type:
Creator:
Michal Schmidt
Created:
2008-09-04 14:48:46 UTC
Size:
3.73 KB
patch
obsolete
>diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt >index 53b53e0..510b701 100644 >--- a/Documentation/filesystems/proc.txt >+++ b/Documentation/filesystems/proc.txt >@@ -1296,6 +1296,14 @@ block_dump > block_dump enables block I/O debugging when set to a nonzero value. More > information on block I/O debugging is in Documentation/laptop-mode.txt. > >+swap_token_timeout >+------------------ >+ >+This file contains valid hold time of swap out protection token. The Linux >+VM has token based thrashing control mechanism and uses the token to prevent >+unnecessary page faults in thrashing situation. The unit of the value is >+second. The value would be useful to tune thrashing behavior. >+ > 2.5 /proc/sys/dev - Device specific parameters > ---------------------------------------------- > >diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt >index 37c13a7..899f3f8 100644 >--- a/Documentation/sysctl/vm.txt >+++ b/Documentation/sysctl/vm.txt >@@ -32,7 +32,7 @@ Currently, these files are in /proc/sys/vm: > > dirty_ratio, dirty_background_ratio, dirty_expire_centisecs, > dirty_writeback_centisecs, vfs_cache_pressure, laptop_mode, >-block_dump: >+block_dump, swap_token_timeout: > > See Documentation/filesystems/proc.txt > >diff --git a/include/linux/swap.h b/include/linux/swap.h >index 3238f9a..953c43a 100644 >--- a/include/linux/swap.h >+++ b/include/linux/swap.h >@@ -240,6 +240,7 @@ extern spinlock_t swaplock; > > /* linux/mm/thrash.c */ > extern struct mm_struct * swap_token_mm; >+extern unsigned long swap_token_default_timeout; > extern void grab_swap_token(void); > extern void __put_swap_token(struct mm_struct *); > >diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h >index 8680e40..3f6430e 100644 >--- a/include/linux/sysctl.h >+++ b/include/linux/sysctl.h >@@ -182,6 +182,7 @@ enum > VM_DROP_PAGECACHE=34, /* nuke lots of pagecache */ > VM_WRITE_MAPPED=35, /* consider mapped pages un dirty_ratio */ > VM_NFS_WB_LOWMEM=36, /* limit NFS writes to Lowmem */ >+ VM_SWAP_TOKEN_TIMEOUT=37, /* default time for token time out */ > }; > > >diff --git a/kernel/sysctl.c b/kernel/sysctl.c >index 59c0533..288a56c 100644 >--- a/kernel/sysctl.c >+++ b/kernel/sysctl.c >@@ -1010,6 +1010,17 @@ static ctl_table vm_table[] = { > .extra1 = &zero, > }, > #endif >+#ifdef CONFIG_SWAP >+ { >+ .ctl_name = VM_SWAP_TOKEN_TIMEOUT, >+ .procname = "swap_token_timeout", >+ .data = &swap_token_default_timeout, >+ .maxlen = sizeof(swap_token_default_timeout), >+ .mode = 0644, >+ .proc_handler = &proc_dointvec_jiffies, >+ .strategy = &sysctl_jiffies, >+ }, >+#endif > { .ctl_name = 0 } > }; > >diff --git a/mm/rmap.c b/mm/rmap.c >index 3a4333c..d289c3f 100644 >--- a/mm/rmap.c >+++ b/mm/rmap.c >@@ -412,6 +412,9 @@ int page_referenced(struct page *page, int is_locked, int ignore_token) > { > int referenced = 0; > >+ if (!swap_token_default_timeout) >+ ignore_token = 1; >+ > if (page_test_and_clear_young(page)) > referenced++; > >diff --git a/mm/thrash.c b/mm/thrash.c >index 1f4b2d3..6ecbfcf 100644 >--- a/mm/thrash.c >+++ b/mm/thrash.c >@@ -20,6 +20,7 @@ struct mm_struct * swap_token_mm = &init_mm; > > #define SWAP_TOKEN_CHECK_INTERVAL (HZ * 2) > #define SWAP_TOKEN_TIMEOUT (HZ * 300) >+unsigned long swap_token_default_timeout = SWAP_TOKEN_TIMEOUT; > > /* > * Take the token away if the process had no page faults >@@ -79,10 +80,10 @@ void grab_swap_token(void) > if ((reason = should_release_swap_token(mm))) { > unsigned long eligible = jiffies; > if (reason == SWAP_TOKEN_TIMED_OUT) { >- eligible += SWAP_TOKEN_TIMEOUT; >+ eligible += swap_token_default_timeout; > } > mm->swap_token_time = eligible; >- swap_token_timeout = jiffies + SWAP_TOKEN_TIMEOUT; >+ swap_token_timeout = jiffies + swap_token_default_timeout; > swap_token_mm = current->mm; > } > spin_unlock(&swap_token_lock);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 439043
:
299501
|
299502
|
299503
|
315760
|
327101