[lkml]   [1996]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectSmall swapfile.c patch

In article <>, Jeff Haumont
<> writes:

> After reading the message about how to enable striped swapping a while
> ago, I tried it and it made an absolutely tremendous difference for me.
> (It doubled the performance of the stupid little benchmark I was using)
> Because of this I suggest:

> diff linux/mm/swapfile.c linux/mm/swapfile.c.old

Your patch is reversed...

> The first change will give all swap partitions the same priority if they
> are not set explicitly or set incorrectly, basically enabling striping
> by default. The only time that I can think of that this would not give
> a performance increase would be when more than one swap partition exists
> on a drive.

Nope. There are many reasons to prioritise swap. For example, you
might want to use a slow drive to act as overflow with a fast primary
swap drive, or your overflow swap partition might be on the same drive
as your /usr and /lib. Keeping primary swap and libs+binaries on
separate drives makes a huge difference in perforance.

> The second change is pretty obvious. Its nice to see the priority when
> you are trying to set this up and want to make sure the kernel is
> getting the message. It also might help more people become aware of
> this feature.

Not a bad idea.

Stephen Tweedie <>
Department of Computer Science, Edinburgh University, Scotland.

 \ /
  Last update: 2005-03-22 13:37    [W:0.082 / U:7.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site