Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 105621 Details for
Bug 131251
kernel Out of Memory: Killed process
Home
New
Search
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.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
Some of the differences between 2.6.8.1-bk2 and 2.6.9-rc1
2681bk2-269rc1.diff (text/plain), 3.66 KB, created by
Anssi Johansson
on 2004-10-22 00:55:12 UTC
(
hide
)
Description:
Some of the differences between 2.6.8.1-bk2 and 2.6.9-rc1
Filename:
MIME Type:
Creator:
Anssi Johansson
Created:
2004-10-22 00:55:12 UTC
Size:
3.66 KB
patch
obsolete
>--- linux-2.6.8.1-bk2/mm/memory.c 2004-08-14 13:55:24.000000000 +0300 >+++ linux-2.6.9-rc1/mm/memory.c 2004-10-21 00:48:27.000000000 +0300 >@@ -1123,12 +1123,12 @@ > static inline void unmap_mapping_range_list(struct prio_tree_root *root, > struct zap_details *details) > { >- struct vm_area_struct *vma = NULL; >+ struct vm_area_struct *vma; > struct prio_tree_iter iter; > pgoff_t vba, vea, zba, zea; > >- while ((vma = vma_prio_tree_next(vma, root, &iter, >- details->first_index, details->last_index)) != NULL) { >+ vma_prio_tree_foreach(vma, &iter, root, >+ details->first_index, details->last_index) { > vba = vma->vm_pgoff; > vea = vba + ((vma->vm_end - vma->vm_start) >> PAGE_SHIFT) - 1; > /* Assume for now that PAGE_CACHE_SHIFT == PAGE_SHIFT */ >@@ -1351,6 +1351,7 @@ > /* Had to read the page from swap area: Major fault */ > ret = VM_FAULT_MAJOR; > inc_page_state(pgmajfault); >+ grab_swap_token(); > } > > mark_page_accessed(page); > >diff -Nru a/mm/thrash.c b/mm/thrash.c >--- /dev/null Wed Dec 31 16:00:00 196900 >+++ b/mm/thrash.c 2004-08-24 00:04:09 -07:00 >@@ -0,0 +1,98 @@ >+/* >+ * mm/thrash.c >+ * >+ * Copyright (C) 2004, Red Hat, Inc. >+ * Copyright (C) 2004, Rik van Riel <riel@redhat.com> >+ * Released under the GPL, see the file COPYING for details. >+ * >+ * Simple token based thrashing protection, using the algorithm >+ * described in: http://www.cs.wm.edu/~sjiang/token.pdf >+ */ >+#include <linux/jiffies.h> >+#include <linux/mm.h> >+#include <linux/sched.h> >+#include <linux/swap.h> >+ >+static spinlock_t swap_token_lock = SPIN_LOCK_UNLOCKED; >+static unsigned long swap_token_timeout; >+unsigned long swap_token_check; >+struct mm_struct * swap_token_mm = &init_mm; >+ >+#define SWAP_TOKEN_CHECK_INTERVAL (HZ * 2) >+#define SWAP_TOKEN_TIMEOUT (HZ * 300) >+ >+/* >+ * Take the token away if the process had no page faults >+ * in the last interval, or if it has held the token for >+ * too long. >+ */ >+#define SWAP_TOKEN_ENOUGH_RSS 1 >+#define SWAP_TOKEN_TIMED_OUT 2 >+static int should_release_swap_token(struct mm_struct *mm) >+{ >+ int ret = 0; >+ if (!mm->recent_pagein) >+ ret = SWAP_TOKEN_ENOUGH_RSS; >+ else if (time_after(jiffies, swap_token_timeout)) >+ ret = SWAP_TOKEN_TIMED_OUT; >+ mm->recent_pagein = 0; >+ return ret; >+} >+ >+/* >+ * Try to grab the swapout protection token. We only try to >+ * grab it once every TOKEN_CHECK_INTERVAL, both to prevent >+ * SMP lock contention and to check that the process that held >+ * the token before is no longer thrashing. >+ */ >+void grab_swap_token(void) >+{ >+ struct mm_struct *mm; >+ int reason; >+ >+ /* We have the token. Let others know we still need it. */ >+ if (has_swap_token(current->mm)) { >+ current->mm->recent_pagein = 1; >+ return; >+ } >+ >+ if (time_after(jiffies, swap_token_check)) { >+ >+ /* Can't get swapout protection if we exceed our RSS limit. */ >+ // if (current->mm->rss > current->mm->rlimit_rss) >+ // return; >+ >+ /* ... or if we recently held the token. */ >+ if (time_before(jiffies, current->mm->swap_token_time)) >+ return; >+ >+ if (!spin_trylock(&swap_token_lock)) >+ return; >+ >+ swap_token_check = jiffies + SWAP_TOKEN_CHECK_INTERVAL; >+ >+ mm = swap_token_mm; >+ if ((reason = should_release_swap_token(mm))) { >+ unsigned long eligible = jiffies; >+ if (reason == SWAP_TOKEN_TIMED_OUT) { >+ eligible += SWAP_TOKEN_TIMEOUT; >+ } >+ mm->swap_token_time = eligible; >+ swap_token_timeout = jiffies + SWAP_TOKEN_TIMEOUT; >+ swap_token_mm = current->mm; >+ } >+ spin_unlock(&swap_token_lock); >+ } >+ return; >+} >+ >+/* Called on process exit. */ >+void __put_swap_token(struct mm_struct *mm) >+{ >+ spin_lock(&swap_token_lock); >+ if (likely(mm == swap_token_mm)) { >+ swap_token_mm = &init_mm; >+ swap_token_check = jiffies; >+ } >+ 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 Raw
Actions:
View
Attachments on
bug 131251
:
104830
|
105388
|
105473
|
105495
|
105549
|
105550
| 105621 |
107318