* [PATCH] pre7-1 semicolon & nicely readable
@ 2000-05-01 14:46 Rik van Riel
0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 2000-05-01 14:46 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-mm, linux-kernel
Hi Linus,
after getting a number of complaints that the semicolon
thing wasn't nicely readable (they're right) I changed my
code as per the patch below.
Could you please put the more readable version in the
next pre kernel?
thanks,
Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.
Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies
http://www.conectiva.com/ http://www.surriel.com/
--- mm/vmscan.c.org2 Sat Apr 29 06:53:00 2000
+++ mm/vmscan.c Mon May 1 11:42:34 2000
@@ -384,11 +384,12 @@
for (; p != &init_task; p = p->next_task) {
int i = 0;
struct mm_struct *mm = p->mm;
- if (!p->swappable || !mm || mm->rss <= 0)
+ if (!p->swappable || !mm || mm->swap_cnt <= 0)
continue;
/* small processes are swapped out less */
while ((mm->swap_cnt << 2 * (i + 1) < max_cnt)
- && i++ < 10)
+ && i < 10)
+ i++;
mm->swap_cnt >>= i;
mm->swap_cnt += i; /* if swap_cnt reaches 0 */
/* we're big -> hog treatment */
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] pre7-1 semicolon & nicely readable
2000-05-02 1:28 [PATCH] pre7-1 semicolon & nicely readableB Rik van Riel
@ 2000-05-02 1:38 ` Roel van der Goot
0 siblings, 0 replies; 2+ messages in thread
From: Roel van der Goot @ 2000-05-02 1:38 UTC (permalink / raw)
To: riel; +Cc: linux-mm, linux-kernel
On Mon, 1 May 2000, Rik van Riel wrote:
> In fact, the <10 test is only there to prevent infinite looping
> for when a process with 0 swap_cnt "slips through" the tests above.
In case of a "slip through" variable i will have a different
value after the loop. But I understand from your reply that you
covered that case.
Cheers,
Roel.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-05-02 1:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-01 14:46 [PATCH] pre7-1 semicolon & nicely readable Rik van Riel
2000-05-02 1:28 [PATCH] pre7-1 semicolon & nicely readableB Rik van Riel
2000-05-02 1:38 ` [PATCH] pre7-1 semicolon & nicely readable Roel van der Goot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox