* cache coloring @ 2013-11-22 9:48 Andrea Braschi 2013-11-22 10:56 ` Andrew Cooper 2013-11-22 17:07 ` Dario Faggioli 0 siblings, 2 replies; 6+ messages in thread From: Andrea Braschi @ 2013-11-22 9:48 UTC (permalink / raw) To: xen-devel [-- Attachment #1.1: Type: text/plain, Size: 759 bytes --] Hi everybody, I'm Andrea and I'm a student from Politecnico di Milano, for a project at my university I need to implement cache coloring for the third level cache for xen-4.2.3 .I'm quite lost in this huge amount of code and documentation and I was wondering if here someone could help me answering some little questions: -where is the code implementing the buddy allocator for the third level caches?(i've found two buddies but none of them seems to me the right one...I'll be implementig this in order to support x86 64 bit architecture) -there's a documentation about it? I apologize if that's not the right list (if it's not please tell me where I can ask) and I hope I was clear in explaining my problem. Thanks in advance for your patience! Andrea [-- Attachment #1.2: Type: text/html, Size: 960 bytes --] [-- Attachment #2: Type: text/plain, Size: 126 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cache coloring 2013-11-22 9:48 cache coloring Andrea Braschi @ 2013-11-22 10:56 ` Andrew Cooper 2013-11-22 17:07 ` Dario Faggioli 1 sibling, 0 replies; 6+ messages in thread From: Andrew Cooper @ 2013-11-22 10:56 UTC (permalink / raw) To: Andrea Braschi; +Cc: xen-devel [-- Attachment #1.1: Type: text/plain, Size: 1182 bytes --] On 22/11/13 09:48, Andrea Braschi wrote: > Hi everybody, > I'm Andrea and I'm a student from Politecnico di Milano, for a project > at my university I need to implement cache coloring for the third > level cache for xen-4.2.3 .I'm quite lost in this huge amount of code > and documentation and I was wondering if here someone could help me > answering some little questions: > > -where is the code implementing the buddy allocator for the third > level caches?(i've found two buddies but none of them seems to me the > right one...I'll be implementig this in order to support x86 64 bit > architecture) None - there is nothing special about the L3 cache as far as memory management is concerned. The buddy allocators present are just for allocation of RAM. > > -there's a documentation about it? > > I apologize if that's not the right list (if it's not please tell me > where I can ask) and I hope I was clear in explaining my problem. This is probably the best place to ask. ~Andrew > > Thanks in advance for your patience! > > Andrea > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel [-- Attachment #1.2: Type: text/html, Size: 2679 bytes --] [-- Attachment #2: Type: text/plain, Size: 126 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cache coloring 2013-11-22 9:48 cache coloring Andrea Braschi 2013-11-22 10:56 ` Andrew Cooper @ 2013-11-22 17:07 ` Dario Faggioli 2013-11-22 17:30 ` Andrea Braschi 1 sibling, 1 reply; 6+ messages in thread From: Dario Faggioli @ 2013-11-22 17:07 UTC (permalink / raw) To: Andrea Braschi; +Cc: xen-devel [-- Attachment #1.1: Type: text/plain, Size: 2533 bytes --] On ven, 2013-11-22 at 10:48 +0100, Andrea Braschi wrote: > Hi everybody, > Hello, and welcome! > I'm Andrea and I'm a student from Politecnico di Milano, for a project > at my university I need to implement cache coloring for the third > level cache for xen-4.2.3 . > Ok, two questions: 1. My "OS concepts" my be a bit rusty, but I only remember something called page coloring. Both Google and Wikipedia seems to agree that page and cache coloring are the same thing, but then I don't understand why you specifically mention L3 above. Can you confirm that it is this that you are after? http://en.wikipedia.org/wiki/Cache_coloring http://www.freebsd.org/doc/en/articles/vm-design/page-coloring-optimizations.html 2. Why 4.2.3 and not upstream? > -where is the code implementing the buddy allocator for the third > level caches?(i've found two buddies but none of them seems to me the > right one...I'll be implementig this in order to support x86 64 bit > architecture) > As far as I know (and as far as I'm able to grep :-)), I think you should start looking at xen/common/page_alloc.c. $ grep -i buddy xen/* -R xen/arch/x86/x86_64/mm.c: * buddy allocator relies on this assumption. xen/arch/x86/x86_64/mm.c: * Mark the allocated page before put free pages to buddy allocator xen/common/page_alloc.c: * Simple buddy heap allocator for Xen. xen/common/page_alloc.c: * BINARY BUDDY ALLOCATOR xen/common/page_alloc.c:/* Remove any offlined page in the buddy pointed to by head. */ xen/common/page_alloc.c: * not freeing it to the buddy allocator. > -there's a documentation about it? > At this level, and for these kind of things, the code itself is the only existent documentation. :-) > I apologize if that's not the right list (if it's not please tell me > where I can ask) and I hope I was clear in explaining my problem. > It is the right place, so feel free o ask. The only thing that is required is to be as specific as possible, i.e., describe your goal, what it is that you are doing to achieve it and what it is that is not working / you are not understanding. This is a nice guide/checklist: http://wiki.xenproject.org/wiki/Asking_Xen_Devel_Questions Regards, Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 198 bytes --] [-- Attachment #2: Type: text/plain, Size: 126 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cache coloring 2013-11-22 17:07 ` Dario Faggioli @ 2013-11-22 17:30 ` Andrea Braschi 2013-11-23 17:08 ` Dario Faggioli 0 siblings, 1 reply; 6+ messages in thread From: Andrea Braschi @ 2013-11-22 17:30 UTC (permalink / raw) To: xen-devel [-- Attachment #1.1: Type: text/plain, Size: 1891 bytes --] > > 1. My "OS concepts" my be a bit rusty, but I only remember something > called page coloring. Both Google and Wikipedia seems to agree that > page and cache coloring are the same thing, but then I don't > understand why you specifically mention L3 above. Can you confirm > that it is this that you are after? > http://en.wikipedia.org/wiki/Cache_coloring > > http://www.freebsd.org/doc/en/articles/vm-design/page-coloring-optimizations.html > > - yes is what i meant As far as I know (and as far as I'm able to grep :-)), I think you > should start looking at xen/common/page_alloc.c. > > $ grep -i buddy xen/* -R > xen/arch/x86/x86_64/mm.c: * buddy allocator relies on this assumption. > xen/arch/x86/x86_64/mm.c: * Mark the allocated page before put free > pages to buddy allocator > xen/common/page_alloc.c: * Simple buddy heap allocator for Xen. > xen/common/page_alloc.c: * BINARY BUDDY ALLOCATOR > xen/common/page_alloc.c:/* Remove any offlined page in the buddy pointed > to by head. */ > xen/common/page_alloc.c: * not freeing it to the buddy allocator. yes i've already done it!...and after two days spent at looking at xen/common/page_alloc.c I was wondering if it was the right chunck of code (I was also been digging through a lot of mm.c...) > At this level, and for these kind of things, the code itself is the only > existent documentation. :-) > :-(...XD > It is the right place, so feel free o ask. The only thing that is > required is to be as specific as possible, i.e., describe your goal, > what it is that you are doing to achieve it and what it is that is not > working / you are not understanding. > > This is a nice guide/checklist: > http://wiki.xenproject.org/wiki/Asking_Xen_Devel_Questions > > Ok thanks, i'll be more specific as soon as I can! by now i really thank you for the attention, soon I'll be more precise! Andrea [-- Attachment #1.2: Type: text/html, Size: 3256 bytes --] [-- Attachment #2: Type: text/plain, Size: 126 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cache coloring 2013-11-22 17:30 ` Andrea Braschi @ 2013-11-23 17:08 ` Dario Faggioli [not found] ` <CAP-9h16hKJ5VcA+h9a2xnBxgZHkgoBDHh21n28u-SpsJ2sGaUA@mail.gmail.com> 0 siblings, 1 reply; 6+ messages in thread From: Dario Faggioli @ 2013-11-23 17:08 UTC (permalink / raw) To: Andrea Braschi; +Cc: xen-devel [-- Attachment #1.1: Type: text/plain, Size: 2972 bytes --] On ven, 2013-11-22 at 18:30 +0100, Andrea Braschi wrote: > 1. My "OS concepts" my be a bit rusty, but I only remember > something > called page coloring. Both Google and Wikipedia seems to > agree that > page and cache coloring are the same thing, but then I > don't > understand why you specifically mention L3 above. Can you > confirm > that it is this that you are after? > http://en.wikipedia.org/wiki/Cache_coloring > > http://www.freebsd.org/doc/en/articles/vm-design/page-coloring-optimizations.html > > - yes is what i meant > Ok. > > > > As far as I know (and as far as I'm able to grep :-)), I think > you > should start looking at xen/common/page_alloc.c. > > $ grep -i buddy xen/* -R > xen/arch/x86/x86_64/mm.c: * buddy allocator relies on this > assumption. > xen/arch/x86/x86_64/mm.c: * Mark the allocated page before > put free pages to buddy allocator > xen/common/page_alloc.c: * Simple buddy heap allocator for > Xen. > xen/common/page_alloc.c: * BINARY BUDDY ALLOCATOR > xen/common/page_alloc.c:/* Remove any offlined page in the > buddy pointed to by head. */ > xen/common/page_alloc.c: * not freeing it to the buddy > allocator. > > > yes i've already done it!...and after two days spent at looking at > xen/common/page_alloc.c I was wondering if it was the right chunck of > code > (I was also been digging through a lot of mm.c...) > Sure. Well, for stuff related to the memory allocator, I really think that's what you are looking for. Why were you thinking that it could not be? > This is a nice guide/checklist: > http://wiki.xenproject.org/wiki/Asking_Xen_Devel_Questions > > Ok thanks, i'll be more specific as soon as I can! by now i really > thank you for the attention, soon I'll be more precise! > Sure! :-) Oh, sorry if insist, but you didn't mention why 4.2.3 and not the upstream git repo: http://xenbits.xen.org/gitweb/?p=xen.git;a=summary (look at the staging branch). I'm asking because, if you'll end up with something sensible, something that brings some nice performances improvements, it would be great to integrate in in Xen upstream, and that would be a lot easier if you work with the latest upstream, rather than with a specific (especially if a quite old) version. If you need help in understanding what "work with the latest upstream" means, I'm sure we can help. :-) Regards, Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 198 bytes --] [-- Attachment #2: Type: text/plain, Size: 126 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAP-9h16hKJ5VcA+h9a2xnBxgZHkgoBDHh21n28u-SpsJ2sGaUA@mail.gmail.com>]
* Re: cache coloring [not found] ` <CAP-9h16hKJ5VcA+h9a2xnBxgZHkgoBDHh21n28u-SpsJ2sGaUA@mail.gmail.com> @ 2013-11-25 7:58 ` Dario Faggioli 0 siblings, 0 replies; 6+ messages in thread From: Dario Faggioli @ 2013-11-25 7:58 UTC (permalink / raw) To: Andrea Braschi; +Cc: xen-devel [-- Attachment #1.1: Type: text/plain, Size: 1557 bytes --] [Adding back the list to the Cc... Please, don't drop it :-)] On dom, 2013-11-24 at 12:14 +0100, Andrea Braschi wrote: > 2013/11/23 Dario Faggioli <dario.faggioli@citrix.com> > Sure. Well, for stuff related to the memory allocator, I > really think > that's what you are looking for. > > Why were you thinking that it could not be? > > > Thanks to you're attentions and suggestions i went back looking better > what's page coloring and now I'm really conviced that page_alloc.c > it's my buddy! as soon as could orient me through its code I'll ask > you if I for any doubt. > Right. > I'm asking because, if you'll end up with something sensible, > something > that brings some nice performances improvements, it would be > great to > integrate in in Xen upstream, and that would be a lot easier > if you work > with the latest upstream, rather than with a specific > (especially if a > quite old) version. > > > That's nice. I will do my best to convince my Ph.D (Shouldn't be hard) > Ok. Direct him here (or ask anything you think might be useful in that regard yourself), if you need any backup with that. :-P Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 198 bytes --] [-- Attachment #2: Type: text/plain, Size: 126 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-25 7:58 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-11-22 9:48 cache coloring Andrea Braschi 2013-11-22 10:56 ` Andrew Cooper 2013-11-22 17:07 ` Dario Faggioli 2013-11-22 17:30 ` Andrea Braschi 2013-11-23 17:08 ` Dario Faggioli [not found] ` <CAP-9h16hKJ5VcA+h9a2xnBxgZHkgoBDHh21n28u-SpsJ2sGaUA@mail.gmail.com> 2013-11-25 7:58 ` Dario Faggioli
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).