Messages in this thread |  | | Date | Tue, 18 Mar 2003 22:09:48 +1200 | From | Nigel Cunningham <> | Subject | Re: [PATCH] Faster SWSUSP free page counting |
| |
Hi.
The speed difference depends of course upon the number of pages free and the degree of fragmentation. I guess the easy answer is that it was written and kept because it helped. Having talked to Andrew about the use of page flags, I'll do some more changes before we put it to Linus - I'll use a dynamically allocated bitmap instead of pageflags.
Regards,
Nigel
On Tue, 2003-03-18 at 20:20, Pavel Machek wrote: > Hi! > > > This patch improves the speed of SWSUSP's count_and_copy_data_pages > > function by generating a map of the free pages before iterating through > > the list of pages. The net result is to go from O(n^2) to O(n), if I > > remember my computer science correctly. > > Is the speed difference noticable? > > If yes than okay, but generate_free_page_map() should still be moved > into kernel/suspend.c. > Pavel -- Nigel Cunningham 495 St Georges Road South, Hastings 4201, New Zealand
Be diligent to present yourself approved to God as a workman who does not need to be ashamed, handling accurately the word of truth. -- 2 Timothy 2:14, NASB.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |