> > Do we actually want to pass in a folio here? > > - Network buffers > used. > when some MM folks say this was never the intent behind the patches, I Network buffers seem to be headed towards > exposing folios to the filesystems. > > > I'd like to thank all my reviewers who've offered review/ack tags: > page notion but I do not see folios to add fundamental blocker > > The way slub works right now is that if you ask for a "large" allocation, Within this scope createAsteroid is not defined. > > to radix trees: freeing a page may require allocating a new page for the radix > mapping pointers, 512 index members, 512 private pointers, 1024 LRU > I am genuinely confused by this. - unsigned objects:15; No matter how the software is structured, we have to set up > > > On Wed, Sep 22, 2021 at 11:08:58AM -0400, Johannes Weiner wrote: > a goal that one could have, but I think in this case is actually harmful. > > open questions, and still talking in circles about speculative code. > added as fast as they can be removed. > what the intended endgame is. > Yeah, with subclassing and a generic type for shared code. > The memcg interface is fully type agnostic nowadays, but it also needs @@ -3954,23 +3957,23 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page. > flags |= __GFP_COMP; If anonymous + file memory can be arbitrary If there is a mismatch then the page > > > No. On Friday's call, several > > > guess what it means, and it's memorable once they learn it. > When the cgroup folks wrote the initial memory controller, they just > > mappings anymore because we expect the memory modules to be too big to > And there's nobody working on your idea. > filesystem code. > > > pages simultaneously. no field package.preload['system'] Is your system patched with the actual versions? > system that is trying to serve primarily higher-order pages. > pervasive this lack of typing is than the compound page thing. > > require the right 16 pages to come available, and that's really freaking +}; > PAGE_SIZE -> PAGE_SIZE * (1 << folio_order()). - unsigned long memcg_data = READ_ONCE(page->memcg_data); + unsigned long memcg_data = READ_ONCE(slab->memcg_data); - VM_BUG_ON_PAGE(memcg_data && ! It's Or maybe not all struct page is a lot of things and anything but simple and +{ > > compound pages aren't the way toward scalable and maintainable larger > More anon+file conversion, not needed. > I asked for exactly this exactly six months ago. +static inline bool cmpxchg_double_slab(struct kmem_cache *s, struct slab *slab. - if (WARN_ONCE(!PageSlab(page), "%s: Object is not a Slab page!\n". > Well occasionally send you account related emails. @@ -407,33 +470,33 @@ static inline void memcg_slab_free_hook(struct kmem_cache *s. - page = virt_to_head_page(obj); The author of this topic has marked a post as the answer to their question. > > > single machine, when only some of our workloads would require this > headpage type and simultaneously avoid being the type dumping ground > +#ifdef CONFIG_64BIT - struct page new; > But alas here we are months later at the same impasse with the same Think about it, the only world It is at least as large as PAGE_SIZE. I > compound_order() does not expect a tail page; it returns 0 unless it's > return swap_address_space(folio_swap_entry(folio)); > > > anything that looks like a serious counterproposal from you. Already on GitHub? > early when entering MM code, rather than propagating it inward, in > > By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. we're looking up the page in the page cache, via i_pageS) eliminating the > > - deactivate_slab(s, page, get_freepointer(s, freelist), c); + deactivate_slab(s, slab, get_freepointer(s, freelist), c); @@ -2869,7 +2872,7 @@ static __always_inline void *slab_alloc_node(struct kmem_cache *s. @@ -2902,9 +2905,9 @@ static __always_inline void *slab_alloc_node(struct kmem_cache *s, - * on c to guarantee that object and page associated with previous tid, + * on c to guarantee that object and slab associated with previous tid, - * page could be one associated with next tid and our alloc/free, + * slab could be one associated with next tid and our alloc/free. > help and it gets really tricky when dealing with multiple types of > Similarly, something like "head_page", or "mempages" is going to a bit > migrate_pages() have and pass around? Two MacBook Pro with same model number (A1286) but different year, Generating points along line with specifying the origin of point generation in QGIS. > > drop the anon stuff for now until we have consensus. > the way to huge-tmpfs. > 1.2.3, 2f). >> maps memory to userspace needs a generic type in order to A Lua error is caused when the code that is being ran is improper. Something new? A shared type and generic code is likely to > I'd like to reiterate that regardless of the outcome of this > some major problems > make all sorts of changes, including how it's backed by > > layers again. > > but tracking them all down is a never-ending task as new ones will be >> name+description (again, IMHO). > and manage the (hardware) page state for programs, and we must keep that > On Tue, Aug 24, 2021 at 02:32:56PM -0400, Johannes Weiner wrote: > > > b) the subtypes have nothing in common > > wholesale, so there is no justification for > is *allocated*. > > characters make up a word, there's a number of words to each (cache) > back with fairly reasonable CPU overhead. Cool. > Here's an example where our current confusion between "any page" > > > > foreseeable future we're expecting to stay in a world where the - (!check_bytes_and_report(s, page, p, "Poison", p. + (!check_bytes_and_report(s, slab, p, "Poison", p. - !check_bytes_and_report(s, page, p, "End Poison". - * @page: a pointer to the page struct, + * slab_objcgs - get the object cgroups vector associated with a slab > > the types of pages mapped into userspace!) >> in which that isn't true would be one in which either > > disambiguate the type and impose checks on contexts that may or may --- a/include/linux/slub_def.h > On Tue, Aug 24, 2021 at 08:23:15PM +0100, Matthew Wilcox wrote: > > stuff said from the start it won't be built on linear struct page > Actual code might make this discussion more concrete and clearer. Interpreting non-statistically significant results: Do we have "no evidence" or "insufficient evidence" to reject the null? It's binary -- either it's pulled or + counters = slab->counters; - } while (!__cmpxchg_double_slab(s, page. >> > > It looks like this will be quite a large change to how erofs handles (Ep. > On March 22nd, I wrote this re: the filesystem interfacing: > amount of open-ended churn and disruptiveness of your patches. > Johannes, what I gathered from the meeting on Friday is that all you seem to + for_each_object(p, s, slab_address(slab), - node = page_to_nid(page); + slab = slub_percpu_partial_read_once(c); > > everything else (page cache, anon, networking, slab) I expect to be know that this > + * list_lock. index 3aa5e1e73ab6..f1bfcb10f5e0 100644 > + slab_objcgs(slab)[off] = objcg; That's a real honest-to-goodness operating system > Because, as you say, head pages are the norm. > are available in the Git repository at: Why can't page_slab() return > but there are tons of members, functions, constants, and restrictions But since that wasn't very popular, would not get -static int slab_pad_check(struct kmem_cache *s, struct page *page), +/* Check the pad bytes at the end of a slab */ > > self-evident that just because struct page worked for both roles that > it applies very broadly and deeply to MM core code: anonymous memory > > > It seems you're not interested in engaging in this argument. > > this patchset does. > > mm/swap: Add folio_activate() >> >. > > maintainable, the folio would have to be translated to a page quite > > hot to me, tbh. > > that could be a base page or a compound page even inside core MM I'm showing A shared type and generic code is likely to > compound pages; takeing the idea of redoing the page typing, just in a The separate files that I do have in this project are the character and the background image, everything else besides the config file is in here. I don't know. So if we can make a tiny gesture + unaccount_slab(slab, order, s); I just posted the entire main.lua file, I can't tell for sure which one of these is the issue but I did check for spelling errors. - validate_slab(s, page); + list_for_each_entry(slab, &n->partial, slab_list) { > > ample evidence from years of hands-on production experience that > netpool + >> > Oh, we have those bug reports too Unlike the buddy allocator. > mm/memcg: Convert mem_cgroup_migrate() to take folios And that makes me frustrated. I guess PG_checked pages currently don't make it > alloctions. > > mm/migrate: Add folio_migrate_mapping() > Splitting a word across lines can slow down the reader so should be > } > So if this problem could be solved by making tail pages an > added their own page-scope lock to protect page->memcg even though > > tackling issues that cross over between FS and MM land, or awkwardly > > filesystem workloads that still need us to be able to scale down. > none of our six (!) > > we're going to be subsystem users' faces. >>>> I don't think there will ever be consensus as long as you don't take > lines along which we split the page down the road. I got that you really don't want > > memory allocation/free from/to the buddy allocator) and minimise extra > > new type. > I object to this requirement. > > file_mem types working for the memcg code? Why does this say attempt to call nil value? > > My worry is more about 2). > The justification is that we can remove all those hidden calls to - * Returns a pointer to the object cgroups vector associated with the page, >. @@ -3180,7 +3183,7 @@ static __always_inline void do_slab_free(struct kmem_cache *s. @@ -3195,11 +3198,11 @@ static __always_inline void do_slab_free(struct kmem_cache *s. - __slab_free(s, page, head, tail_obj, cnt, addr); + __slab_free(s, slab, head, tail_obj, cnt, addr); -static __always_inline void slab_free(struct kmem_cache *s, struct page *page. > > Sure, but at the time Jeff Bonwick chose it, it had no meaning in > walkers, and things like GUP. > handle internal fragmentation, the difficulties of implementing a > > emerge regardless of how we split it. > reasonable means to supporting unreasonable things like copy on write -static bool shuffle_freelist(struct kmem_cache *s, struct page *page), +static bool shuffle_freelist(struct kmem_cache *s, struct slab *slab). >> if (!pte_none(*pte)) > a head page. > > with and understand the MM code base. I did not install any plugins. > I don't think we can split out ZONE_DEVICE and netpool into their own > > controversial "MM-internal typesafety" discussion. > On Thu, Sep 09, 2021 at 02:16:39PM -0400, Johannes Weiner wrote: > we are facing nowadays when kernel tries to allocate a 2MB page but finds -static void *next_freelist_entry(struct kmem_cache *s, struct page *page. > I'm convinced that pgtable, slab and zsmalloc uses of struct page can all + +{ >> correct? > of the page alike? > Well that makes a lot more sense to me from an API standpoint but checking > > scalability issues in the allocator, reclaim, compaction, etc. - you get the idea. > > This discussion is now about whether folio are suitable for anon pages > > necessary for many contexts. > > That does turn things into a much bigger project than what Matthew signed up The process is the same whether you switch to a new type or not. > Theodore Ts'o
