Robert Haas [Wed, 2 Jul 2014 14:48:38 +0000 (14:48 +0000)]
Fix build.
Robert Haas [Fri, 13 Jun 2014 17:57:35 +0000 (17:57 +0000)]
Inlining.
Robert Haas [Fri, 13 Jun 2014 17:50:06 +0000 (17:50 +0000)]
Remove balloc_map stuff and sub in an inline implementation.
Robert Haas [Fri, 13 Jun 2014 16:24:21 +0000 (16:24 +0000)]
Cache the most recent region lookup.
The general value of this is debatable, because access could be pretty
random across a large number of regions. But the sort code, for example,
likes to ask about chunks of memory that were just recently allocated
or are about to be freed, so this will help there, too. And it helps
a lot if someone (say) builds a linked list and then frees the elements
in order.
Robert Haas [Thu, 12 Jun 2014 21:09:04 +0000 (21:09 +0000)]
Remove unused stuff.
Robert Haas [Thu, 12 Jun 2014 21:04:46 +0000 (17:04 -0400)]
Cruft removal.
Robert Haas [Thu, 12 Jun 2014 20:37:10 +0000 (16:37 -0400)]
BlockAllocatorStats
Robert Haas [Thu, 12 Jun 2014 19:59:25 +0000 (15:59 -0400)]
Fix context reset to not corrupt the context.
Robert Haas [Thu, 12 Jun 2014 19:44:48 +0000 (15:44 -0400)]
Fix a couple of XXXs.
Robert Haas [Thu, 12 Jun 2014 19:43:18 +0000 (15:43 -0400)]
I have a bug!
Robert Haas [Wed, 11 Jun 2014 21:21:47 +0000 (17:21 -0400)]
Get test_balloc to compile again.
Robert Haas [Mon, 9 Jun 2014 21:00:30 +0000 (21:00 +0000)]
Fix aregion.c bugs in computing which region freelist to target.
Robert Haas [Mon, 9 Jun 2014 18:33:26 +0000 (18:33 +0000)]
Remove unneeded variable.
Robert Haas [Mon, 9 Jun 2014 17:32:41 +0000 (13:32 -0400)]
Comment adjustments.
Robert Haas [Mon, 9 Jun 2014 17:12:45 +0000 (13:12 -0400)]
Add realloc; finish re-plumbing sort stuff.
Robert Haas [Thu, 5 Jun 2014 20:56:57 +0000 (16:56 -0400)]
Remove duplicate deference.
Robert Haas [Thu, 5 Jun 2014 20:55:56 +0000 (16:55 -0400)]
Fix totally wrong formula.
Robert Haas [Wed, 4 Jun 2014 19:04:04 +0000 (15:04 -0400)]
More MemoryContext integration.
Robert Haas [Wed, 4 Jun 2014 17:42:50 +0000 (13:42 -0400)]
Better integration for BlockAllocatorGetChunkSpace.
Robert Haas [Tue, 13 May 2014 16:02:40 +0000 (12:02 -0400)]
Partially integrate with MemoryContext stuff.
Robert Haas [Tue, 13 May 2014 15:19:39 +0000 (11:19 -0400)]
Remove flags argument to BlockAllocatorAlloc, and other tweaks.
Robert Haas [Tue, 13 May 2014 14:54:56 +0000 (10:54 -0400)]
test_sballoc -> test_balloc
Robert Haas [Tue, 13 May 2014 14:51:35 +0000 (10:51 -0400)]
Renaming cleanup.
Robert Haas [Mon, 12 May 2014 22:32:56 +0000 (18:32 -0400)]
More renaming, and other edits.
Robert Haas [Mon, 12 May 2014 19:22:15 +0000 (15:22 -0400)]
More renaming, somewhat incomplete. sb_alloc.c/h -> balloc.c/h.
Robert Haas [Mon, 12 May 2014 18:27:11 +0000 (14:27 -0400)]
sb_region.c/h -> aregion.c/h
Robert Haas [Mon, 12 May 2014 17:24:58 +0000 (13:24 -0400)]
Rename sb_map to BlockAllocatorMap (source file balloc_map.c/h).
Robert Haas [Fri, 9 May 2014 19:33:24 +0000 (15:33 -0400)]
Move more stuff out of sb_alloc.h.
Robert Haas [Mon, 5 May 2014 16:08:06 +0000 (16:08 +0000)]
More efficient replacement for GetMemoryChunkSpace().
When the allocation size is known, we can can compute the result
directly from that, rather than working it out from the pointer itself.
Robert Haas [Mon, 5 May 2014 14:34:02 +0000 (14:34 +0000)]
Teach sb_free about large objects; avoid hysteresis therein.
Robert Haas [Mon, 5 May 2014 13:48:24 +0000 (09:48 -0400)]
Crude plumbing to allow 'REINDEX INDEX pgbench_accounts' to use sb_alloc.
Robert Haas [Mon, 5 May 2014 13:48:06 +0000 (09:48 -0400)]
sb_chunk_space
Robert Haas [Tue, 29 Apr 2014 20:44:20 +0000 (20:44 +0000)]
Avoid fetching the size class more than once.
This is noticeably faster.
Robert Haas [Tue, 29 Apr 2014 19:30:36 +0000 (19:30 +0000)]
Cache the results of the last sb_find_leaf operation.
If all the memory we're accessing is in the same 4GB segment of the address
space, this eliminates calls to sb_find_leaf altogether, a significant
savings. But even if we're ranging across more than one segment, this
should win in cases that have some degree of access locality.
Robert Haas [Tue, 29 Apr 2014 18:08:46 +0000 (18:08 +0000)]
Avoid referencing memory we've already freed.
Robert Haas [Tue, 29 Apr 2014 17:17:41 +0000 (13:17 -0400)]
Finish up sb_free.
Robert Haas [Tue, 29 Apr 2014 16:58:18 +0000 (12:58 -0400)]
Teach sb_free to unlink spans and return their storage to fpm.
The spans themselves don't get reclaimed yet.
Robert Haas [Tue, 29 Apr 2014 15:42:29 +0000 (11:42 -0400)]
Reset allocator after use.
Robert Haas [Tue, 29 Apr 2014 15:38:36 +0000 (11:38 -0400)]
Fix bug.
Robert Haas [Tue, 29 Apr 2014 15:31:41 +0000 (11:31 -0400)]
Fix a bug.
Robert Haas [Tue, 29 Apr 2014 15:24:42 +0000 (11:24 -0400)]
Fix erroneous use of fpm_base rather than base.
Robert Haas [Tue, 29 Apr 2014 15:20:32 +0000 (11:20 -0400)]
Correct completely bogus Assert.
Robert Haas [Tue, 29 Apr 2014 15:20:13 +0000 (11:20 -0400)]
Add an Assert.
Robert Haas [Tue, 29 Apr 2014 13:53:17 +0000 (09:53 -0400)]
Fix typo.
Robert Haas [Tue, 29 Apr 2014 11:36:24 +0000 (07:36 -0400)]
test_sballoc: make a big linked list, then free it one node at a time
Robert Haas [Tue, 15 Apr 2014 21:15:37 +0000 (17:15 -0400)]
Sketch out sb_free.
Robert Haas [Fri, 11 Apr 2014 18:44:04 +0000 (14:44 -0400)]
test_sballoc: show palloc stats, and delete context explicitly
Robert Haas [Fri, 11 Apr 2014 18:31:06 +0000 (14:31 -0400)]
add some stats on memory consumption
Robert Haas [Fri, 11 Apr 2014 17:22:55 +0000 (13:22 -0400)]
fix contiguous freespace reporting for previous patch
Robert Haas [Fri, 11 Apr 2014 17:09:01 +0000 (13:09 -0400)]
improve FreePageManager
- fix a bug when the btree root is created from the last free page
- when the btree root is a leaf and is surrounded on either side by
freespace, collapse it to a singleton range
Robert Haas [Fri, 11 Apr 2014 14:35:32 +0000 (14:35 +0000)]
Fix bugs.
Robert Haas [Fri, 11 Apr 2014 14:32:24 +0000 (14:32 +0000)]
further test_sballoc temporary changes
Robert Haas [Fri, 11 Apr 2014 01:07:08 +0000 (01:07 +0000)]
Refactoring to streamline the common case.
It makes more sense this way, too.
Robert Haas [Thu, 10 Apr 2014 23:51:43 +0000 (23:51 +0000)]
Remove sb_try_to_steal_superblock.
It makes no sense with just one heap per size class.
Robert Haas [Thu, 10 Apr 2014 22:57:20 +0000 (22:57 +0000)]
sb_region: Improve private freelist management.
Robert Haas [Thu, 10 Apr 2014 21:12:31 +0000 (21:12 +0000)]
nused->nallocatable. this avoids computing nmax for every allocation,
which turns out to speed things up *a lot* (3.7s vs. 5.3s for 100m
8-byte allocations)
Robert Haas [Thu, 10 Apr 2014 20:01:52 +0000 (20:01 +0000)]
Push obsize/nmax computation down.
Testing shows this is faster (5.4s vs 5.7s for 100m 8-byte allocations).
Robert Haas [Thu, 10 Apr 2014 19:53:52 +0000 (19:53 +0000)]
temporary hack for test_sballoc
Robert Haas [Thu, 10 Apr 2014 19:29:07 +0000 (19:29 +0000)]
Remove num_size_classes. For now, at least, it's a constant.
Robert Haas [Thu, 10 Apr 2014 18:00:34 +0000 (18:00 +0000)]
Remove support for N heaps per size class.
Profiling shows that this is wicked expensive.
Robert Haas [Thu, 10 Apr 2014 16:43:56 +0000 (16:43 +0000)]
Fix bugs.
Robert Haas [Wed, 9 Apr 2014 18:18:18 +0000 (18:18 +0000)]
Fix bugs.
Robert Haas [Wed, 9 Apr 2014 17:01:00 +0000 (17:01 +0000)]
Fix compiler warnings.
Robert Haas [Fri, 28 Mar 2014 05:51:44 +0000 (22:51 -0700)]
Add debugging code, fix bugs.
Robert Haas [Wed, 26 Mar 2014 23:55:43 +0000 (16:55 -0700)]
test_sballoc improvements.
Robert Haas [Wed, 26 Mar 2014 23:53:44 +0000 (16:53 -0700)]
sb_reset_allocator
Robert Haas [Wed, 26 Mar 2014 23:23:59 +0000 (16:23 -0700)]
Fix bugs.
Robert Haas [Wed, 26 Mar 2014 00:07:19 +0000 (17:07 -0700)]
test_sballoc: comparison testing vs. palloc
Robert Haas [Wed, 26 Mar 2014 00:01:12 +0000 (17:01 -0700)]
Fix bugs.
Robert Haas [Tue, 25 Mar 2014 23:23:55 +0000 (16:23 -0700)]
Fix bugs.
Robert Haas [Tue, 25 Mar 2014 18:29:16 +0000 (11:29 -0700)]
Fix bug in test_sballoc.
Robert Haas [Tue, 25 Mar 2014 18:26:48 +0000 (11:26 -0700)]
Oops.
Robert Haas [Tue, 25 Mar 2014 00:22:08 +0000 (17:22 -0700)]
Fix bug.
Robert Haas [Tue, 25 Mar 2014 00:19:26 +0000 (17:19 -0700)]
test_sballoc
Robert Haas [Mon, 24 Mar 2014 23:06:21 +0000 (16:06 -0700)]
last bits of sb_alloc_from_heap
Robert Haas [Mon, 24 Mar 2014 21:55:04 +0000 (14:55 -0700)]
fill in more of sb_alloc_from_heap
Robert Haas [Sat, 22 Mar 2014 14:51:17 +0000 (10:51 -0400)]
rough sketch of sb_alloc_from_heap
Robert Haas [Fri, 21 Mar 2014 18:35:56 +0000 (14:35 -0400)]
more of sb_alloc, still missing some guts
Robert Haas [Fri, 21 Mar 2014 16:51:12 +0000 (12:51 -0400)]
sb_alloc, less guts.
Robert Haas [Fri, 21 Mar 2014 11:36:22 +0000 (07:36 -0400)]
sb_create_private_allocator
Robert Haas [Thu, 20 Mar 2014 21:43:37 +0000 (17:43 -0400)]
sb_private_region_for_allocator, part two.
Robert Haas [Wed, 19 Mar 2014 20:35:00 +0000 (16:35 -0400)]
Add private flag to sb_allocator.
Robert Haas [Wed, 19 Mar 2014 20:28:25 +0000 (16:28 -0400)]
sb_private_region_for_allocator, part one.
Robert Haas [Wed, 19 Mar 2014 19:47:55 +0000 (15:47 -0400)]
sb_report_contiguous_freespace
Robert Haas [Wed, 12 Mar 2014 17:25:40 +0000 (13:25 -0400)]
Add FreePageManagerInquireLargest.
Robert Haas [Wed, 12 Mar 2014 16:40:43 +0000 (12:40 -0400)]
sb_region_lookup
Robert Haas [Tue, 11 Mar 2014 21:33:48 +0000 (17:33 -0400)]
Stub out sb_alloc/sb_region.
Robert Haas [Tue, 11 Mar 2014 21:31:17 +0000 (17:31 -0400)]
sb_map: Fix typo.
Robert Haas [Tue, 11 Mar 2014 19:39:10 +0000 (15:39 -0400)]
sb_map
Robert Haas [Tue, 11 Mar 2014 18:04:36 +0000 (14:04 -0400)]
Fix typo.
Robert Haas [Fri, 28 Feb 2014 18:27:09 +0000 (13:27 -0500)]
Fix bugs.
Robert Haas [Thu, 27 Feb 2014 18:07:28 +0000 (13:07 -0500)]
More hacking.
Robert Haas [Thu, 27 Feb 2014 16:41:54 +0000 (11:41 -0500)]
More hacking.
Robert Haas [Wed, 26 Feb 2014 13:18:17 +0000 (08:18 -0500)]
More hacking.
Robert Haas [Fri, 21 Feb 2014 05:41:13 +0000 (00:41 -0500)]
Fix bugs.
Robert Haas [Thu, 20 Feb 2014 21:17:31 +0000 (16:17 -0500)]
Fix bugs.
Robert Haas [Thu, 20 Feb 2014 19:48:28 +0000 (14:48 -0500)]
Fix bugs.
Robert Haas [Thu, 20 Feb 2014 17:25:17 +0000 (12:25 -0500)]
Fix bugs.
Robert Haas [Thu, 20 Feb 2014 16:01:44 +0000 (11:01 -0500)]
test_freepage fixes.
Robert Haas [Thu, 20 Feb 2014 15:45:59 +0000 (10:45 -0500)]
test_freepage harness.