5 Replies Latest reply: Nov 2, 2010 4:02 PM by 806178 RSS

    db 4.8 and newer on SPARC v7 + v8?

    806178
      Hi,

      the locking changes in db 4.8 and db 5 have effectively locked out SPARC v7 (sun4c) and v8 (sun4m) machines, see <http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=43444>.

      Is there any help you could provide for building db on pre-UltraSPARC machines? Any chance of rethinking the drop of fcntl locking?

      Thanks,
      hauke
        • 1. Re: db 4.8 and newer on SPARC v7 + v8?
          Bogdan Coman-Oracle
          Hi Hauke,

          Supported platforms for DB 4.8 and beyond require some kind of shared latches, such as pthread rwlocks. or a test-and-set primitive.
          The configure test for test-and-set primitive on Sparc/gcc-assembly uses the V9 sparc version of a memory barrier instruction:
               membar #StoreStore|#StoreLoad|#LoadStore
          The extra modifiers are needed for V9, but cause errors during configuration for earlier versions of Sparc, causing it to fall back to the lowest common denominator of fcntl mutexes, which are indeed not supported.

          Can you configure --with-mutex=POSIX/pthreads?
          If the pthread_rwlock_*() calls are not available then it may be necessary to stay with db-4.7 on Sparc platforms before V9. Is this an acceptable option for you?

          Thanks,
          Bogdan Coman
          • 2. Re: db 4.8 and newer on SPARC v7 + v8?
            806178
            Bogdan, thanks for your reply.

            NetBSD does not have pthread_rwlock_*(), see e.g. <http://comments.gmane.org/gmane.os.netbsd.current/53544>.

            So, if I read you right, my options are to either pin NetBSD/sparc to db 4.7.x (which may eventually bring up dependency issues - we are talking pkgsrc here - so it is not a long-term solution), or to craft a set-and-test primitive that works on sparc v[78], which appears to be a bit of a challenge.

            If I got the NetBSD sparc asm gurus to come up with a solution to the latter (that is, test-and-set, and a way to choose an architecture at build-time), would the db project be willing to accept the code?

            hauke
            • 3. Re: db 4.8 and newer on SPARC v7 + v8?
              806178
              Seems to be fairly easy to come up with a test-and-set for pre-sparc-v9 cpus, after all, see <http://mail-index.netbsd.org/port-sparc/2010/10/28/msg000939.html> ff.

              On a related issue: Is there a concise document on how to run the db test suites? 'sh test_micro' threw me off with shell syntax errors (mathematically comparing strings to numbers, or somesuch), and the tcl scripts complain about not finding libraries.

              hauke
              • 4. Re: db 4.8 and newer on SPARC v7 + v8?
                Bogdan Coman-Oracle
                Hauke Fath wrote:
                On a related issue: Is there a concise document on how to run the db test suites? 'sh test_micro' threw me off with shell syntax errors (mathematically comparing strings to numbers, or somesuch), and the tcl scripts complain about not finding libraries.
                Yes, you can find it here:
                Running the test suite under UNIX - http://download.oracle.com/docs/cd/E17076_02/html/installation/build_unix_test.html

                Bogdan Coman
                • 5. Re: db 4.8 and newer on SPARC v7 + v8?
                  806178
                  Thanks, that got me running. I also found <http://www.linuxfromscratch.org/blfs/view/svn/server/db.html> helpful, btw.

                  Do you know whether a "r lock" is sufficient as a test for the locking change? The "run_parallel 5 run_std" I am currently running is at 500 of 2803 parallel items, 230 hrs to go...

                  hauke