Flexible I/O Tester development
 help / color / mirror / Atom feed
* anonymous mmap issue on solaris
@ 2014-10-30 14:06 Sébastien Bouchex Bellomié
  2014-10-30 14:40 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Sébastien Bouchex Bellomié @ 2014-10-30 14:06 UTC (permalink / raw)
  To: fio@vger.kernel.org

Hi,

An issue on solaris�:

Anonymous mmap must have a fd set to -1 in order to work (on linux, it is ignored), in alloc_mem_mmap, the fd is set to 1

[.]
static int alloc_mem_mmap(struct thread_data *td, size_t total_mem)
{
��������������� int flags = 0;

��������������� td->mmapfd = 1;

��������������� if (td->o.mem_type == MEM_MMAPHUGE) {
[.]

Changing it to -1 makes the code working fine.

Bye
Seb


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: anonymous mmap issue on solaris
  2014-10-30 14:06 anonymous mmap issue on solaris Sébastien Bouchex Bellomié
@ 2014-10-30 14:40 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2014-10-30 14:40 UTC (permalink / raw)
  To: Sébastien Bouchex Bellomié, fio@vger.kernel.org

On 2014-10-30 08:06, S�bastien Bouchex Bellomi� wrote:
> Hi,
>
> An issue on solaris :
>
> Anonymous mmap must have a fd set to -1 in order to work (on linux, it is ignored), in alloc_mem_mmap, the fd is set to 1
>
> [.]
> static int alloc_mem_mmap(struct thread_data *td, size_t total_mem)
> {
>                  int flags = 0;
>
>                  td->mmapfd = 1;
>
>                  if (td->o.mem_type == MEM_MMAPHUGE) {
> [.]
>
> Changing it to -1 makes the code working fine.

That actually just looks like a typo, it makes no sense for this to be 
'1'... I'll fix it, thanks for finding it!

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-30 14:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-30 14:06 anonymous mmap issue on solaris Sébastien Bouchex Bellomié
2014-10-30 14:40 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox