mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Vince Weaver <vincent.weaver@maine.edu>, Wang Nan <wangnan0@huawei.com>
Cc: mtk.manpages@gmail.com, pi3orama@163.com,
	linux-kernel@vger.kernel.org, linux-man@vger.kernel.org,
	lizefan@huawei.com
Subject: Re: [PATCH 2/2] perf_event_open.2: Document write_backward
Date: Sat, 22 Oct 2016 12:05:55 +0200	[thread overview]
Message-ID: <c805a296-8a65-9297-74fe-ee04926055c8@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1610211716280.16183@macbook-air>

On 10/21/2016 11:25 PM, Vince Weaver wrote:
> On Fri, 21 Oct 2016, Wang Nan wrote:
> 
>>            context_switch :  1,  /* context switch data */
>> -
>> -          __reserved_1   : 37;
>> +          write_backward :  1,  /* Write ring buffer from end to beginning */
>> +          __reserved_1   : 36;
> 
> This removes a blank line, not sure if intentional or not.

Maybe it would be better to keep it. I don't feel too strongly about 
this though.

>> +.IR "write_backward" " (since Linux 4.6)"
> 
> It didn't committed until Linux 4.7 from what I can tell?

Yes, that's my recollection too.

> 
>> +This makes the resuling event use a backward ring-buffer, which
> resulting
> 
>> +writes samples from the end of the ring-buffer.
>> +
>> +It is not allowed to connect events with backward and forward
>> +ring-buffer settings together using
>> +.B PERF_EVENT_IOC_SET_OUTPUT.
>> +
>> +Backward ring-buffer is useful when the ring-buffer is overwritable
>> +(created by readonly
>> +.BR mmap (2)
>> +). 
> 
> A ring buffer is over-writable when it is mmapped readonly?
> Is this a hard requirement?
> Can you set the read-backwards bit if not mapped readonly?

Wang Nan, could you perhaps clarify this in the next version of the patch?

> 
> Otherwise the documentation seems reasonable.
> 
> Reviewed-by: Vince Weaver <vincent.weaver@maine.edu>

Thanks for reviewing both patches, Vince. Wang Nan, please include the
Reviewed-by: in the next patch iteration.

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

  reply	other threads:[~2016-10-22 10:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 11:38 [PATCH 1/2] perf_event_open.2: Document PERF_EVENT_IOC_PAUSE_OUTPUT Wang Nan
2016-10-21 11:38 ` [PATCH 2/2] perf_event_open.2: Document write_backward Wang Nan
2016-10-21 21:25   ` Vince Weaver
2016-10-22 10:05     ` Michael Kerrisk (man-pages) [this message]
2016-10-24  6:44       ` Wangnan (F)
2016-10-21 21:16 ` [PATCH 1/2] perf_event_open.2: Document PERF_EVENT_IOC_PAUSE_OUTPUT Vince Weaver
2016-10-22 10:00   ` Michael Kerrisk (man-pages)
2016-10-22 10:02 ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c805a296-8a65-9297-74fe-ee04926055c8@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=pi3orama@163.com \
    --cc=vincent.weaver@maine.edu \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®