On Mon, 18 Nov 2019 at 11:41, Alex Bennée wrote:
>
>
> >>
> > OK, got it.
> > We will need to make one other change to target/tilegx/translate.c
> > since it conditionally unlocks depending on what qemu_log_lock()
> > returns.
>
> Hmm I'd be tempted to drop the locking all together and drop the
Robert Foley writes:
> On Mon, 18 Nov 2019 at 08:23, Alex Bennée wrote:
>>
>>
>> Robert Foley writes:
>>
>> > On Mon, 18 Nov 2019 at 07:22, Alex Bennée wrote:
>> >>
>> >>
>> >> > +if (logfile) {
>> >> > +qemu_flockfile(logfile->fd);
>> >> > +return logfile->fd;
>> >> > +
On Mon, 18 Nov 2019 at 08:23, Alex Bennée wrote:
>
>
> Robert Foley writes:
>
> > On Mon, 18 Nov 2019 at 07:22, Alex Bennée wrote:
> >>
> >>
> >> > +if (logfile) {
> >> > +qemu_flockfile(logfile->fd);
> >> > +return logfile->fd;
> >> > +} else {
> >> > +
Robert Foley writes:
> On Mon, 18 Nov 2019 at 07:22, Alex Bennée wrote:
>>
>>
>> > +if (logfile) {
>> > +qemu_flockfile(logfile->fd);
>> > +return logfile->fd;
>> > +} else {
>> > +rcu_read_unlock();
>>
>> As qemu_log_lock() and unlock should be paired we can
On Mon, 18 Nov 2019 at 07:22, Alex Bennée wrote:
>
>
> > +if (logfile) {
> > +qemu_flockfile(logfile->fd);
> > +return logfile->fd;
> > +} else {
> > +rcu_read_unlock();
>
> As qemu_log_lock() and unlock should be paired we can drop the unlock
> here and do an
Robert Foley writes:
> This now allows changing the logfile while logging is active,
> and also solves the issue of a seg fault while changing the logfile.
>
> Any read access to the qemu_logfile handle will use
> the rcu_read_lock()/unlock() around the use of the handle.
> To fetch the handle
This now allows changing the logfile while logging is active,
and also solves the issue of a seg fault while changing the logfile.
Any read access to the qemu_logfile handle will use
the rcu_read_lock()/unlock() around the use of the handle.
To fetch the handle we will use atomic_rcu_read().
We