@@ -195,17 +195,6 @@ void ZGeneration::select_relocation_set(ZGenerationId generation, bool promote_a
195195 for (ZPage* page; pt_iter.next (&page);) {
196196 if (!page->is_relocatable ()) {
197197 // Not relocatable, don't register
198- // Note that the seqnum can change under our feet here as the page
199- // can be concurrently freed and recycled by a concurrent generation
200- // collection. However this property is stable across such transitions.
201- // If it was not relocatable before recycling, then it won't be
202- // relocatable after it gets recycled either, as the seqnum atomically
203- // becomes allocating for the given generation. The opposite property
204- // also holds: if the page is relocatable, then it can't have been
205- // concurrently freed; if it was re-allocated it would not be
206- // relocatable, and if it was not re-allocated we know that it was
207- // allocated earlier than mark start of the current generation
208- // collection.
209198 continue ;
210199 }
211200
@@ -218,15 +207,14 @@ void ZGeneration::select_relocation_set(ZGenerationId generation, bool promote_a
218207
219208 // Reclaim empty pages in bulk
220209
221- // An active iterator blocks immediate recycle and delete of pages.
222- // The intent it to allow the code that iterates over the pages to
223- // safely read the properties of the pages without them being changed
224- // by another thread. However, this function both iterates over the
225- // pages AND frees/recycles them. We "yield" the iterator, so that we
226- // can perform immediate recycling (as long as no other thread is
227- // iterating over the pages). The contract is that the pages that are
228- // about to be freed are "owned" by this thread, and no other thread
229- // will change their states.
210+ // An active iterator blocks immediate deletion of pages. The intent is
211+ // to allow the code that iterates over pages to safely read properties
212+ // of the pages without them being freed/deleted. However, this function
213+ // both iterates over the pages AND frees them. We "yield" the iterator,
214+ // so that we can perform immediate deletion (as long as no other thread
215+ // is iterating over the pages). The contract is that the pages that are
216+ // about to be freed are "owned" by this thread, and no other thread will
217+ // change their states.
230218 pt_iter.yield ([&]() {
231219 free_empty_pages (&selector, 64 /* bulk */ );
232220 });
@@ -939,7 +927,7 @@ void ZGenerationYoung::flip_promote(ZPage* from_page, ZPage* to_page) {
939927 _page_table->replace (from_page, to_page);
940928
941929 // Update statistics
942- _page_allocator->promote_used (from_page-> size () );
930+ _page_allocator->promote_used (from_page, to_page );
943931 increase_freed (from_page->size ());
944932 increase_promoted (from_page->live_bytes ());
945933}
@@ -948,7 +936,7 @@ void ZGenerationYoung::in_place_relocate_promote(ZPage* from_page, ZPage* to_pag
948936 _page_table->replace (from_page, to_page);
949937
950938 // Update statistics
951- _page_allocator->promote_used (from_page-> size () );
939+ _page_allocator->promote_used (from_page, to_page );
952940}
953941
954942void ZGenerationYoung::register_flip_promoted (const ZArray<ZPage*>& pages) {
0 commit comments