Return-Path: MIME-Version: 1.0 In-Reply-To: <20090901053838.GK12579@kernel.dk> References: <7efa8a7d0908311900o2f0bfbb8t52a8b518782e2bdc@mail.gmail.com> <20090901053838.GK12579@kernel.dk> Date: Tue, 1 Sep 2009 16:43:59 -0700 Message-ID: <7efa8a7d0909011643r5c86384uedb6c8ef0e1c33ab@mail.gmail.com> Subject: Re: FIO for MIPS From: Learner Study Content-Type: multipart/alternative; boundary=0016e64b92dc7cfc0504728cb969 To: Jens Axboe Cc: fio@vger.kernel.org, vmurgai@yahoo.com List-ID: --0016e64b92dc7cfc0504728cb969 Content-Type: text/plain; charset=ISO-8859-1 Hi Jens: Thanks - it works well. I'm using FIO with posixaio ioengine and performance is pretty bad. I'm trying to get libaio to work in my MIPS environment. Based on my tests in previous x86 env, I had seen libaio to give better performance with FIO as compared to posixaio. Again, thanks for your prompt help. On Mon, Aug 31, 2009 at 10:38 PM, Jens Axboe wrote: > On Mon, Aug 31 2009, Learner Study wrote: > > Hello: > > > > I checked README for FIO and apparently it isn't yet supported on MIPS64 > > platform yet (atleast until version 1.30) > > Does someone have a patch I could use to do this? Any other ideas... > > I just checked in the below patch. I haven't checked the memory ordering > defines yet, not sure if any of the mips cpus are weaker ordered. I'll > check that later, this should at least get you started. > > commit c28b912f77c3dafbdcdcf4def2c8c1f9c127100c > Author: Jens Axboe > Date: Tue Sep 1 07:23:57 2009 +0200 > > MIPS support > > Signed-off-by: Jens Axboe > > diff --git a/arch/arch-mips.h b/arch/arch-mips.h > new file mode 100644 > index 0000000..759d3a9 > --- /dev/null > +++ b/arch/arch-mips.h > @@ -0,0 +1,25 @@ > +#ifndef ARCH_MIPS64_H > +#define ARCH_MIPS64_H > + > +#define ARCH (arch_mips) > + > +#ifndef __NR_ioprio_set > +#define __NR_ioprio_set 314 > +#define __NR_ioprio_get 315 > +#endif > + > +#ifndef __NR_fadvise64 > +#define __NR_fadvise64 215 > +#endif > + > +#ifndef __NR_sys_splice > +#define __NR_sys_splice 263 > +#define __NR_sys_tee 265 > +#define __NR_sys_vmsplice 266 > +#endif > + > +#define read_barrier() __asm__ __volatile__("": : :"memory") > +#define write_barrier() __asm__ __volatile__("": : > :"memory") > +#define nop __asm__ __volatile__("": : :"memory") > + > +#endif > diff --git a/arch/arch.h b/arch/arch.h > index 28c6632..87db222 100644 > --- a/arch/arch.h > +++ b/arch/arch.h > @@ -31,6 +31,8 @@ enum { > #include "arch-sparc64.h" > #elif defined(__arm__) > #include "arch-arm.h" > +#elif defined(__mips__) || defined(__mips64__) > +#include "arch-mips.h" > #else > #error "Unsupported arch" > #endif > > -- > Jens Axboe > > --0016e64b92dc7cfc0504728cb969 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Jens:

Thanks - it works well.

I'm using FIO with posi= xaio ioengine and performance is pretty bad. I'm trying to get libaio t= o work=A0 in my MIPS environment. Based on my tests in previous x86 env, I = had seen libaio to give better performance with FIO as compared to posixaio= .

Again, thanks for your prompt help.

O= n Mon, Aug 31, 2009 at 10:38 PM, Jens Axboe <jens.axboe@oracle.com> wrot= e:
On Mon, Aug 31 2009, Learner Study wrote:
> Hello:
>
> I checked README for FIO and apparently it isn't yet supported on = MIPS64
> platform yet (atleast until version 1.30)
> Does someone have a patch I could use to do this? Any other ideas...
I just checked in the below p= atch. I haven't checked the memory ordering
defines yet, not sure if any of the mips cpus are weaker ordered. I'll<= br> check that later, this should at least get you started.

commit c28b912f77c3dafbdcdcf4def2c8c1f9c127100c
Author: Jens Axboe <jens.axboe@= oracle.com>
Date: =A0 Tue Sep 1 07:23:57 2009 +0200

=A0 =A0MIPS support

=A0 =A0Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

diff --git a/arch/arch-mips.h b/arch/arch-mips.h
new file mode 100644
index 0000000..759d3a9
--- /dev/null
+++ b/arch/arch-mips.h
@@ -0,0 +1,25 @@
+#ifndef ARCH_MIPS64_H
+#define ARCH_MIPS64_H
+
+#define ARCH =A0 (arch_mips)
+
+#ifndef __NR_ioprio_set
+#define __NR_ioprio_set =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0314
+#define __NR_ioprio_get =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0315
+#endif
+
+#ifndef __NR_fadvise64
+#define __NR_fadvise64 =A0 =A0 =A0 =A0 215
+#endif
+
+#ifndef __NR_sys_splice
+#define __NR_sys_splice =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0263
+#define __NR_sys_tee =A0 =A0 =A0 =A0 =A0 265
+#define __NR_sys_vmsplice =A0 =A0 =A0266
+#endif
+
+#define read_barrier() =A0 =A0 =A0 =A0 __asm__ __volatile__("": = : :"memory")
+#define write_barrier() =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0__asm__ __volatile_= _("": : :"memory")
+#define nop =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0__asm__ __volatile__(&q= uot;": : :"memory")
+
+#endif
diff --git a/arch/arch.h b/arch/arch.h
index 28c6632..87db222 100644
--- a/arch/arch.h
+++ b/arch/arch.h
@@ -31,6 +31,8 @@ enum {
=A0#include "arch-sparc64.h"
=A0#elif defined(__arm__)
=A0#include "arch-arm.h"
+#elif defined(__mips__) || defined(__mips64__)
+#include "arch-mips.h"
=A0#else
=A0#error "Unsupported arch"
=A0#endif

--
Jens Axboe


--0016e64b92dc7cfc0504728cb969--