Bug 450420
| Summary: | patch silently fails to apply hunk of a patch | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Rik van Riel <riel> | ||||||
| Component: | patch | Assignee: | Tim Waugh <twaugh> | ||||||
| Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | low | Docs Contact: | |||||||
| Priority: | low | ||||||||
| Version: | 9 | ||||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2008-06-10 10:50:25 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Rik van Riel
2008-06-08 03:18:00 UTC
Created attachment 308628 [details]
vmscan.c
Created attachment 308629 [details]
patch that caused the problem
Can't reproduce that here I'm afraid:
[tim@worm ~]$ filterdiff -i '*/vmscan.c' --hunk=5
rvr-04-linux-2.6-scan-ratio-fixes.patch
--- linux-2.6.26-rc2-mm1.orig/mm/vmscan.c 2008-05-28 12:11:38.000000000 -0400
+++ linux-2.6.26-rc2-mm1/mm/vmscan.c 2008-05-28 12:11:51.000000000 -0400
@@ -1180,15 +1180,19 @@ static void get_scan_ratio(struct zone *
file = zone_page_state(zone, NR_ACTIVE_FILE) +
zone_page_state(zone, NR_INACTIVE_FILE);
- rotate_sum = zone->recent_rotated_file + zone->recent_rotated_anon;
-
/* Keep a floating average of RECENT references. */
- if (unlikely(rotate_sum > min(anon, file))) {
+ if (unlikely(zone->recent_scanned_anon > anon / zone->inactive_ratio)) {
spin_lock_irq(&zone->lru_lock);
- zone->recent_rotated_file /= 2;
+ zone->recent_scanned_anon /= 2;
zone->recent_rotated_anon /= 2;
spin_unlock_irq(&zone->lru_lock);
- rotate_sum /= 2;
+ }
+
+ if (unlikely(zone->recent_scanned_file > file / 4)) {
+ spin_lock_irq(&zone->lru_lock);
+ zone->recent_scanned_file /= 2;
+ zone->recent_rotated_file /= 2;
+ spin_unlock_irq(&zone->lru_lock);
}
/*
[tim@worm ~]$ sha1sum vmscan.c rvr-04-linux-2.6-scan-ratio-fixes.patch
1a23376211c806e76cadd42729aac9168bcd8f1f vmscan.c
ff060add298b5da766615361c5af8943e4cb6e4a rvr-04-linux-2.6-scan-ratio-fixes.patch
[tim@worm ~]$ filterdiff -i '*/vmscan.c' rvr-04-linux-2.6-scan-ratio-fixes.patch
| patch vmscan.c
patching file vmscan.c
Hunk #1 succeeded at 917 (offset 24 lines).
Hunk #2 FAILED at 973.
Hunk #3 succeeded at 1029 (offset -5 lines).
Hunk #4 succeeded at 1183 (offset 1 line).
Hunk #5 succeeded at 1186 (offset -5 lines).
Hunk #6 succeeded at 1217 (offset 1 line).
Hunk #7 FAILED at 1264.
Hunk #8 FAILED at 1291.
Hunk #9 succeeded at 1298 (offset -5 lines).
3 out of 9 hunks FAILED -- saving rejects to file vmscan.c.rej
[tim@worm ~]$ sed -ne '1185,1203p' vmscan.c
file = zone_page_state(zone, NR_ACTIVE_FILE) +
zone_page_state(zone, NR_INACTIVE_FILE);
/* Keep a floating average of RECENT references. */
if (unlikely(zone->recent_scanned_anon > anon / zone->inactive_ratio)) {
spin_lock_irq(&zone->lru_lock);
zone->recent_scanned_anon /= 2;
zone->recent_rotated_anon /= 2;
spin_unlock_irq(&zone->lru_lock);
}
if (unlikely(zone->recent_scanned_file > file / 4)) {
spin_lock_irq(&zone->lru_lock);
zone->recent_scanned_file /= 2;
zone->recent_rotated_file /= 2;
spin_unlock_irq(&zone->lru_lock);
}
/*
[tim@worm ~]$ rpm -q patch
patch-2.5.4-32.fc9.x86_64
|