Re: [Gems-users] Does ruby leak memory?


Date: Wed, 9 Dec 2009 12:49:20 -0600
From: Dan Gibson <degibson@xxxxxxxx>
Subject: Re: [Gems-users] Does ruby leak memory?
Javier,
Thanks for sharing your improvements! For now, I've made the files available in patch form via the GEMS download directory, with citation to you.

Regards,
Dan

2009/12/9 Javi Merino <jmerino@xxxxxxxxxxxxx>
Dan Gibson wrote:
> Javier,
> As far as Ruby is concerned, It would be safe to reclaim memory used
> by a block when its no longer cache anywhere on-chip(s). In other
> words, if that block was ever accessed again, the DirectoryEntry
> constructor would restore the same state. We've never bothered to
> implement block recycling because the memory usage of Simics has
> always been large anyway (though it can be helped with
> set-memory-limit), and its difficult to tell when blocks really are no
> longer cached (e.g., it is protocol specific).
>
> Let me, and the list, know how your experiment goes with freeing old
> blocks. I've poked around a bit myself and haven't found any other
> likely culprits (that is not proof that they dont' exist!) -- but
> anecdotally, Ruby is stable to run for weeks at a time in some of my
> longer simulations.

Dan, I modified ruby and the MOESI_CMP_token protocol (see
01_free_unused_directory_entries.patch and
02_MOESI_CMP_token_free_DEs.patch). Both patches are against GEMS 2.1.
After running the same simulation, the memory used by Simics+GEMS was
reduced by 20%. The memory used by the simulator still seems to grow
forever, so I don't know if the issue has really been solved, but at
least this is a nice memory reduction which would help our simulations.

As you pointed out, telling when blocks are no longer cached is protocol
specific. You have to call freeBlocks() at the end of the transition in
the directory (memory) part of slicc. The best place is at the end of
setState(), as you can see in 02_MOESI_CMP_token_free_DEs.

I also attach a patch for MOESI_CMP_NUCA, for those of us who still use
GEMS to simulate NUCAs :-)

Regards,
Javier Merino

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.





--
http://www.cs.wisc.edu/~gibson [esc]:wq!
[← Prev in Thread] Current Thread [Next in Thread→]