[Tmem-devel] [Tmem-users] compile error after patch tmem-xen

Dan Magenheimer dan.magenheimer at oracle.com
Sat Apr 18 09:04:47 PDT 2009


Hi Ruby --

It requires some code changes in tmem so that all data structures are taken from xenheap, but all tmem full pages of data are taken from anonymous domheap.

Also, compression cannot be turned on for 32-bit (because that would require the compressed pages to be taken from xenheap).

Since xenheap is limited to 12MB, tmem keeps growing until the 12MB is gone.  I didn't increase the size of xenheap, but if it can be increased, that would allow more memory to be used for tmem.

My limited testing on tmem-32 is by compiling linux over and over (170 times now and still running).

I'll try to get the code changes published early next week and then you can look for the ifdefs to see what changes I made.  Also, tmem will be going into xen-unstable soon (soon after 3.4.0 releases).

Dan
  -----Original Message-----
  From: ruby young [mailto:yangyang at les.buaa.edu.cn]
  Sent: Friday, April 17, 2009 6:15 PM
  To: Dan Magenheimer
  Subject: Re: [Tmem-users] compile error after patch tmem-xen


  Thanks Dan~
  It's really good news for me~
  Could you tell me how did you do that? I tried to increase the size of xenheap, but it seems not working well.
  Another questions are How can I get the source code and what testing do you do running on the tmem-32?

  Best wishes!
                                                                     Ruby 


  2009/4/18 Dan Magenheimer <dan.magenheimer at oracle.com>

    HI Ruby --

    Good news!  I have tmem working on a 32-bit hypervisor again!

    It is limited by xenheap, so can't be used effectively on large memory machines and probably shouldn't be used for benchmarking.  But it can be used for experimentation and some testing.

    If you are still interested, let me know and I will get it cleaned up and posted.

    Thanks,
    Dan
      -----Original Message-----
      From: ruby young [mailto:yangyang at les.buaa.edu.cn]

      Sent: Sunday, April 05, 2009 11:02 PM
      To: Dan Magenheimer
      Subject: Re: [Tmem-users] compile error after patch tmem-xen


      Thanks Dan~

      I have not found 64-bit machine now.  I tried to change the size of xenheap using the way mentioned in maillist but not succeed. What a pity! But I would concern on tmem and I hope I could discuss with you more. 

      Best wishes!
                                              Ruby Young


      On Wed, Apr 1, 2009 at 11:10 AM, Dan Magenheimer <dan.magenheimer at oracle.com> wrote:

        Hi Ruby --

        Are you sure your hardware won't support 64-bit?  Nearly all processors built in the last 3-4 years do, even though most people don't use it.  In Linux (dom0 is fine), do "cat /proc/cpuinfo | grep -w lm".  If you get anything, the cpu has 64-bit support.

        Because of the limited address space in 32-bit, xenheap is very small and the only way to use pointers from domheap is to bracket EVERY use of a pointer (to memory obtained from domheap) with two function calls to ensure that the pointer is mapped in the 32-bit range.  This makes the tmem code unreadable and unmanageable so I dropped 32-bit support.

        Dan
          -----Original Message-----
          From: ruby young [mailto:yangyang at les.buaa.edu.cn]

          Sent: Tuesday, March 31, 2009 8:02 PM
          To: Dan Magenheimer
          Subject: Re: [Tmem-users] compile error after patch tmem-xen


          Thanks Dan~

          My machine is 32-bit hardware, so it's pity that I cannot use it.
          Do you have any plan to transplant tmem into 32-bit machine? If not, why don't you do that?Do you think it isn't necessary to do this?

          Best wishes!
                                                                    Ruby young


          2009/3/31 Dan Magenheimer <dan.magenheimer at oracle.com>

            Hi Ruby --

            One other thing I should have told you:  tmem will not work on 32-bit hardware or 32-bit Xen.  You must have 64-bit hardware and 64-bit Xen.

            The change you suggest below is incorrect... all alloc_xenheap_pages calls need to be converted to use two arguments.  There was a patch in xen-unstable this year to do that and tmem depends on it.

            I should be able to publish a 3.3.1 patch (and maybe a 64-bit 3.3.1-based xen) today or tomorrow.

            Dan
              -----Original Message-----
              From: ruby young [mailto:yangyang at les.buaa.edu.cn]

              Sent: Tuesday, March 31, 2009 1:56 AM
              To: Dan Magenheimer
              Subject: Re: [Tmem-users] compile error after patch tmem-xen


              Hi Dan~
               
                  The problem in first mail I have found: in 26 lines of tmem_xen.h: 
                  #define  tmem_alloc_tmemheap_pages(_o) alloc_xenheap_pages(_o,0) have 2 arguments to function alloc_xenheap_pages,but it should be only 1 argument. 
                  so, I think it can change as below:
                  #define  tmem_alloc_tmemheap_pages(_o) alloc_xenheap_pages(_o)
                  
                 best wishes!
                                                                                   Ruby

              PS: the problem in first mail 
                 tmem.c: In function ‘pool_alloc’:
                 tmem.c:678: error: too many arguments to function ‘alloc_xenheap_pages’
              and I cannot find alloc_xenheap_pages functions in that place but tmem_alloc_tmemheap_pages(0). What can I do if I want to try to use tmem?
                  Thanks very much!



              2009/3/31 ruby young <yangyang at les.buaa.edu.cn>

                Hi Dan~

                By the way, I know how to build a guest kernel inside of VM, and I prefer 2.6.18.8-xen.

                                                                                              Ruby

                2009/3/31 ruby young <yangyang at les.buaa.edu.cn> 


                  Hi Dan~
                      Thanks for your reply!
                      I will try to use and feedback!
                      If I have further idea in use tmem, I'd like sharing the idea with you!
                      Best wishes!
                                                                                   Ruby

                  2009/3/31 Dan Magenheimer <dan.magenheimer at oracle.com> 


                    Hi Ruby --

                    Thanks for your feedback!

                    Tmem requires both a patched xen and a patched guest kernel.
                    Also, the xen tools installed on domain0 should be patched.
                    Then, tmem must be enabled with the xen boot parameter "tmem"
                    and "tmem_compress" will enable compression of all tmem
                    pages.

                    Do you know how to build and boot a new guest kernel inside
                    of a VM?  Would you prefer 2.6.18-xen or 2.6.29 as your guest
                    kernel?

                    Since tmem absorbs memory from xen's free memory list, you
                    can see from dom0 that tmem is using memory with:

                    xm info | grep free

                    If you have the "watch" command on your system,  you can do:

                    watch "xm info | grep free"

                    to watch xen's free memory change as tmem uses it.


                    Dan

                    -----Original Message-----
                    From: ruby young [mailto:yangyang at les.buaa.edu.cn]

                    Sent: Monday, March 30, 2009 7:07 AM
                    To: Dan Magenheimer
                    Subject: Re: [Tmem-users] compile error after patch tmem-xen


                    Hi Dan~

                    Thanks for your reply.
                    I'm interested in memory allocation method of xen and I have follow your self-balloon and tmem. After rebuild self-ballooning, I think it's a good idea of constructing a memory pool which can implemet dynamic memory allocation and reduce IO paging, then I read your mail list and you summit slide. It's really good idea and long-term planning of your tmem.
                    Now I have some problem of your tmem. For I didn't find readme of tmem, I didn't know how to use it, that means after I patched successfully how do I know tmem can work correctly?
                    Another problem is how do you test the usage rate of the whole memory? You have said the tmem pool can full with the whole memory space, but how do you know? Is it some test bench for you to say that?

                    Best Wishes!
                                                                                                  Ruby Young


                    2009/3/26 Dan Magenheimer <dan.magenheimer at oracle.com>

                    Hi Ruby --

                    Tmem is still under active development and I've been focused on keeping up with xen-unstable.  It is difficult to keep active development synchronized with many versions (of both xen and Linux) but I have started working on a patch to work with Xen 3.3.1 (not 3.3.0).  Would that work for you?  If so, I should have it in a few days.

                    Would you mind describing what you are planning to use tmem for?

                    Thanks,
                    Dan
                    -----Original Message-----
                    From: ruby young [mailto:yangyang at les.buaa.edu.cn]
                    Sent: Wednesday, March 25, 2009 7:24 PM
                    To: tmem-users at oss.oracle.com
                    Subject: [Tmem-users] compile error after patch tmem-xen


                    Hi, all
                       After I patched all of the tmem-xen-*.patch  and recompile xen 3.3.0, There is an error:
                       tmem.c: In function ‘pool_alloc’:
                       tmem.c:678: error: too many arguments to function ‘alloc_xenheap_pages’
                    and I cannot find alloc_xenheap_pages functions in that place but tmem_alloc_tmemheap_pages(0). What can I do if I want to try to use tmem?
                        Thanks very much!

                    --
                    Best wishes

                    杨漾
                    北京航空航天大学计算机学院体系结构研究所
                    电话:010-82338059-132
                    邮件:9907yruby at gmail.com
                    地址:北京市海淀区学院路37号北京航空航天大学新主楼 G座1026
                    --------------------------------------------------------------------------------
                    Yang Yang
                    Institute of Computer Architecture and System
                    BeiHang University(BUAA)
                    Tel: (86-10)82338059-132
                    Email: 9907yruby at gmail.com
                    Addr: Room 1026,Building G,The New Main Building,37# Xueyuan Rd.,Haidian District, Beijing 100083, PRC


                    _______________________________________________
                    Tmem-users mailing list
                    Tmem-users at oss.oracle.com
                    http://oss.oracle.com/mailman/listinfo/tmem-users





                    --
                    Best wishes

                    杨漾
                    北京航空航天大学计算机学院体系结构研究所
                    电话:010-82338059-132
                    邮件:9907yruby at gmail.com
                    地址:北京市海淀区学院路37号北京航空航天大学新主楼 G座1026
                    --------------------------------------------------------------------------------
                    Yang Yang
                    Institute of Computer Architecture and System
                    BeiHang University(BUAA)
                    Tel: (86-10)82338059-132
                    Email: 9907yruby at gmail.com
                    Addr: Room 1026,Building G,The New Main Building,37# Xueyuan Rd.,Haidian District, Beijing 100083, PRC




                  -- 
                  Best wishes

                  杨漾
                  北京航空航天大学计算机学院体系结构研究所
                  电话:010-82338059-132
                  邮件:9907yruby at gmail.com
                  地址:北京市海淀区学院路37号北京航空航天大学新主楼 G座1026
                  --------------------------------------------------------------------------------
                  Yang Yang
                  Institute of Computer Architecture and System 
                  BeiHang University(BUAA)
                  Tel: (86-10)82338059-132
                  Email: 9907yruby at gmail.com
                  Addr: Room 1026,Building G,The New Main Building,37# Xueyuan Rd.,Haidian District, Beijing 100083, PRC




                -- 

                Best wishes

                杨漾
                北京航空航天大学计算机学院体系结构研究所
                电话:010-82338059-132
                邮件:9907yruby at gmail.com
                地址:北京市海淀区学院路37号北京航空航天大学新主楼 G座1026
                --------------------------------------------------------------------------------
                Yang Yang
                Institute of Computer Architecture and System 
                BeiHang University(BUAA)
                Tel: (86-10)82338059-132
                Email: 9907yruby at gmail.com
                Addr: Room 1026,Building G,The New Main Building,37# Xueyuan Rd.,Haidian District, Beijing 100083, PRC




              -- 
              Best wishes

              杨漾
              北京航空航天大学计算机学院体系结构研究所
              电话:010-82338059-132
              邮件:9907yruby at gmail.com
              地址:北京市海淀区学院路37号北京航空航天大学新主楼 G座1026
              --------------------------------------------------------------------------------
              Yang Yang
              Institute of Computer Architecture and System 
              BeiHang University(BUAA)
              Tel: (86-10)82338059-132
              Email: 9907yruby at gmail.com
              Addr: Room 1026,Building G,The New Main Building,37# Xueyuan Rd.,Haidian District, Beijing 100083, PRC




          -- 
          Best wishes

          杨漾
          北京航空航天大学计算机学院体系结构研究所
          电话:010-82338059-132
          邮件:9907yruby at gmail.com
          地址:北京市海淀区学院路37号北京航空航天大学新主楼 G座1026
          --------------------------------------------------------------------------------
          Yang Yang
          Institute of Computer Architecture and System 
          BeiHang University(BUAA)
          Tel: (86-10)82338059-132
          Email: 9907yruby at gmail.com
          Addr: Room 1026,Building G,The New Main Building,37# Xueyuan Rd.,Haidian District, Beijing 100083, PRC




      -- 
      Best wishes

      杨漾
      北京航空航天大学计算机学院体系结构研究所
      电话:010-82338059-132
      邮件:9907yruby at gmail.com
      地址:北京市海淀区学院路37号北京航空航天大学新主楼 G座1026
      --------------------------------------------------------------------------------
      Yang Yang
      Institute of Computer Architecture and System 
      BeiHang University(BUAA)
      Tel: (86-10)82338059-132
      Email: 9907yruby at gmail.com
      Addr: Room 1026,Building G,The New Main Building,37# Xueyuan Rd.,Haidian District, Beijing 100083, PRC




  -- 
  Best wishes

  杨漾
  北京航空航天大学计算机学院体系结构研究所
  电话:010-82338059-132
  邮件:9907yruby at gmail.com
  地址:北京市海淀区学院路37号北京航空航天大学新主楼 G座1026
  --------------------------------------------------------------------------------
  Yang Yang
  Institute of Computer Architecture and System 
  BeiHang University(BUAA)
  Tel: (86-10)82338059-132
  Email: 9907yruby at gmail.com
  Addr: Room 1026,Building G,The New Main Building,37# Xueyuan Rd.,Haidian District, Beijing 100083, PRC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/tmem-devel/attachments/20090418/9fcf82a2/attachment-0001.html 


More information about the Tmem-devel mailing list