Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-28 Thread Peter Maydell
On 8 October 2013 01:41, Marcelo Tosatti wrote: > +ret = sigaction(SIGBUS, &oldact, NULL); > +if (ret) { > +perror("file_ram_alloc: fail to reinstall signal handler"); "failed". thanks -- PMM

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-28 Thread Paolo Bonzini
Il 08/10/2013 02:41, Marcelo Tosatti ha scritto: > MAP_POPULATE mmap flag does not cause mmap to fail if allocation > of the entire area is not performed. HugeTLBfs performs reservation > of pages on a global basis: any further restriction to the reserved memory > such as cpusets placement or num

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-10 Thread Marcelo Tosatti
On Wed, Oct 09, 2013 at 11:26:58PM +0200, Paolo Bonzini wrote: > Il 09/10/2013 21:41, Marcelo Tosatti ha scritto: > >> > How was that tested? For BUS_MCEERR_AO it can work, but BUS_MCEERR_AR > >> > calls force_sig_info which does this: > >> > > >> > ignored = action->sa.sa_handler == SIG_

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-09 Thread Paolo Bonzini
Il 09/10/2013 23:26, Paolo Bonzini ha scritto: > Il 09/10/2013 21:41, Marcelo Tosatti ha scritto: How was that tested? For BUS_MCEERR_AO it can work, but BUS_MCEERR_AR calls force_sig_info which does this: ignored = action->sa.sa_handler == SIG_IGN; blocked

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-09 Thread Paolo Bonzini
Il 09/10/2013 21:41, Marcelo Tosatti ha scritto: >> > How was that tested? For BUS_MCEERR_AO it can work, but BUS_MCEERR_AR >> > calls force_sig_info which does this: >> > >> > ignored = action->sa.sa_handler == SIG_IGN; >> > blocked = sigismember(&t->blocked, sig); >> > i

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-09 Thread Marcelo Tosatti
On Wed, Oct 09, 2013 at 10:05:44AM +0200, Paolo Bonzini wrote: > Il 08/10/2013 23:51, Marcelo Tosatti ha scritto: > > On Tue, Oct 08, 2013 at 10:03:48AM +0200, Paolo Bonzini wrote: > >> Il 08/10/2013 02:41, Marcelo Tosatti ha scritto: > >>> +/* unblock SIGBUS */ > >>> +pthread_sigma

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-09 Thread Paolo Bonzini
Il 08/10/2013 23:51, Marcelo Tosatti ha scritto: > On Tue, Oct 08, 2013 at 10:03:48AM +0200, Paolo Bonzini wrote: >> Il 08/10/2013 02:41, Marcelo Tosatti ha scritto: >>> +/* unblock SIGBUS */ >>> +pthread_sigmask(SIG_BLOCK, NULL, &oldset); >>> +sigemptyset(&set); >>> +

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-08 Thread Marcelo Tosatti
On Tue, Oct 08, 2013 at 10:03:48AM +0200, Paolo Bonzini wrote: > Il 08/10/2013 02:41, Marcelo Tosatti ha scritto: > > +/* unblock SIGBUS */ > > +pthread_sigmask(SIG_BLOCK, NULL, &oldset); > > +sigemptyset(&set); > > +sigaddset(&set, SIGBUS); > > +pthread_sigm

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-08 Thread Paolo Bonzini
Il 08/10/2013 02:41, Marcelo Tosatti ha scritto: > +/* unblock SIGBUS */ > +pthread_sigmask(SIG_BLOCK, NULL, &oldset); > +sigemptyset(&set); > +sigaddset(&set, SIGBUS); > +pthread_sigmask(SIG_UNBLOCK, &set, NULL); Please instead modify qemu-thread-posix.c to