From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jos Poortvliet" Subject: Re: Re: howto get a patch merged (WAS: Re: -mm merge plans for 2.6.23) Date: Thu, 26 Jul 2007 15:54:40 +0200 Message-ID: <5c77e14b0707260654n508b6c13tce656917a7b532ae@mail.gmail.com> References: <367a23780707250830i20a04a60n690e8da5630d39a9@mail.gmail.com> <46A773EA.5030103@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============030156646982893109==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ck-bounces@vds.kolivas.org Errors-To: ck-bounces@vds.kolivas.org To: Robert Deaton Cc: ck list , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Rene Herman List-Id: linux-mm.kvack.org --===============030156646982893109== Content-Type: multipart/alternative; boundary="----=_Part_133262_12784483.1185458080050" ------=_Part_133262_12784483.1185458080050 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/25/07, Robert Deaton wrote: > > On 7/25/07, Rene Herman wrote: > > And there we go again -- off into blabber-land. Why does swap-prefetch > help > > updatedb? Or doesn't it? And if it doesn't, why should anyone trust > anything > > else someone who said it does says? > > I don't think anyone has ever argued that swap-prefetch directly helps > the performance of updatedb in any way, however, I do recall people > mentioning that updatedb, being a ram intensive task, will often cause > things to be swapped out while it runs on say a nightly cronjob. If a > person is not at their computer, updatedb will run, cause all their > applications to be swapped out, finish its work, and exit, leaving all > the other applications that would have otherwise been left in RAM for > when the user returns to his/her computer in swap. Thus, when someone > returns, you have to wait for all your applications to be swapped back > in. > > Swap prefetch, on the other hand, would have kicked in shortly after > updatedb finished, leaving the applications in swap for a speedy > recovery when the person comes back to their computer. Note that the updatedb scenario should actually be properly fixed some other way: updatedb, touching everything only once, shouldn't dirty the caches like it does. But the same thing happens when you open a 10 megapixel picture for editing in Krita, or start OpenOffice. After closing them, a lot of ram is freed. Yet the data which is pushed to swap when you used these apps will remain there, until you start using them. Swap-prefetch will gently get this data back (while keeping it also in swap, to ensure a quick response when the ram is needed for another big app - so you have the advantages, but not the disadvantages!). I haven't heard anyone claim this scenario can be 'fixed' in a 'more proper' way than with swap prefetch. And nobody has been able to prove that swap-prefetch has any bad sideeffects. So it IS a net-gain. But only for desktop users who hit swap. So it's good for those doing video and photo editing, for example. Or low-mem systems with OpenOffice. Or ppl doing heavy compiles while low on ram. It doesn't help nor hinder laptop users (it is automatically turned off on laptops to save power), and it doesn't help nor hinder big 16-gb-ram systems (they probably don't hit swap often, quick responses might not be important, they're mostly busy so swap-prefetch doesn't run and most importantly: they won't have it turned on anyway). -- > --Robert Deaton > _______________________________________________ > http://ck.kolivas.org/faqs/replying-to-mailing-list.txt > ck mailing list - mailto: ck@vds.kolivas.org > http://vds.kolivas.org/mailman/listinfo/ck > ------=_Part_133262_12784483.1185458080050 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/25/07, Robert Deaton <false.hopes@gmail.com> wrote:
On 7/25/07, Rene Herman <rene.herman@gmail.com> wrote:
> And there we go again -- off into blabber-land. Why does swap-prefetch help
> updatedb? Or doesn't it? And if it doesn't, why should anyone trust anything
> else someone who said it does says?

I don't think anyone has ever argued that swap-prefetch directly helps
the performance of updatedb in any way, however, I do recall people
mentioning that updatedb, being a ram intensive task, will often cause
things to be swapped out while it runs on say a nightly cronjob. If a
person is not at their computer, updatedb will run, cause all their
applications to be swapped out, finish its work, and exit, leaving all
the other applications that would have otherwise been left in RAM for
when the user returns to his/her computer in swap. Thus, when someone
returns, you have to wait for all your applications to be swapped back
in.

Swap prefetch, on the other hand, would have kicked in shortly after
updatedb finished, leaving the applications in swap for a speedy
recovery when the person comes back to their computer.

Note that the updatedb scenario should actually be properly fixed some other way: updatedb, touching everything only once, shouldn't dirty the caches like it does.

But the same thing happens when you open a 10 megapixel picture for editing in Krita, or start OpenOffice. After closing them, a lot of ram is freed. Yet the data which is pushed to swap when you used these apps will remain there, until you start using them. Swap-prefetch will gently get this data back (while keeping it also in swap, to ensure a quick response when the ram is needed for another big app - so you have the advantages, but not the disadvantages!).

I haven't heard anyone claim this scenario can be 'fixed' in a 'more proper' way than with swap prefetch. And nobody has been able to prove that swap-prefetch has any bad sideeffects. So it IS a net-gain. But only for desktop users who hit swap. So it's good for those doing video and photo editing, for example. Or low-mem systems with OpenOffice. Or ppl doing heavy compiles while low on ram.

It doesn't help nor hinder laptop users (it is automatically turned off on laptops to save power), and it doesn't help nor hinder big 16-gb-ram systems (they probably don't hit swap often, quick responses might not be important, they're mostly busy so swap-prefetch doesn't run and most importantly: they won't have it turned on anyway).

--
--Robert Deaton
_______________________________________________
http://ck.kolivas.org/faqs/replying-to-mailing-list.txt
ck mailing list - mailto: ck@vds.kolivas.org
http://vds.kolivas.org/mailman/listinfo/ck

------=_Part_133262_12784483.1185458080050-- --===============030156646982893109== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============030156646982893109==--