t; You diff is broken, this is very much not the clear_buddies() function.
You're right. it is in pick_next_entity().
2017-08-01 16:38 GMT+08:00 Peter Zijlstra <pet...@infradead.org>:
> On Tue, Aug 01, 2017 at 06:01:56PM +0800, Yafang Shao wrote:
>> When we select CFQ as the schedu
Hi Peter,
2017-08-01 17:12 GMT+08:00 Peter Zijlstra <pet...@infradead.org>:
> On Tue, Aug 01, 2017 at 04:57:43PM +0800, Yafang Shao wrote:
>> > And how would that happen? We only call pick_next_entity(.curr=NULL)
>> > when we _know_ cfs_rq->nr_running.
>>
pet...@infradead.org>:
> On Tue, Aug 08, 2017 at 08:53:10PM +0800, Yafang Shao wrote:
>> Sometimes we want to get tasks in TASK_RUNNING sepcifically,
>> instead of dump all tasks.
>> For example, when the loadavg are high, we want to dump
>> tasks in TASK_RUNNING and TASK_
.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
drivers/tty/sysrq.c | 2 +-
include/linux/sched.h | 1 +
include/linux/sched/debug.h | 6 --
kernel/sched/core.c | 7 ---
4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/tty/sysrq.c b/drive
.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
drivers/tty/sysrq.c | 2 +-
include/linux/sched.h | 1 +
include/linux/sched/debug.h | 6 --
kernel/sched/core.c | 7 ---
4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/tty/sysrq.c b/drive
is that
dumping both blocked tasks and running tasks is more helpful than
dump blocked tasks only. That's an improvement.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
drivers/tty/sysrq.c | 15 ---
include/linux/sched.h | 1 +
include/linux/sched/debug.
2017-08-09 15:43 GMT+08:00 Peter Zijlstra <pet...@infradead.org>:
> On Wed, Aug 09, 2017 at 06:31:28PM +0800, Yafang Shao wrote:
>> Sometimes we want to get tasks in TASK_RUNNING sepcifically,
>> instead of dump all tasks.
>>
>> For example, when the loadavg a
2017-08-09 17:09 GMT+08:00 Peter Zijlstra <pet...@infradead.org>:
> On Wed, Aug 09, 2017 at 04:01:49PM +0800, Yafang Shao wrote:
>> 2017-08-09 15:43 GMT+08:00 Peter Zijlstra <pet...@infradead.org>:
>> > On Wed, Aug 09, 2017 at 06:31:28PM +0800, Yafang Shao wrote:
' and 'curr'
could both be NULL, then this will cause NULL pointer issue.
In order to fix this issue, we just need return NULL under the condition
that both 'left' and 'curr' are NULL, meaning that no entity available.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
kernel/sched/fair
2017-08-08 19:24 GMT+08:00 Peter Zijlstra <pet...@infradead.org>:
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?On Tue, Aug 08, 2017 at
> 07:
Okay.
I will submit the whole work in a new patch later.
2017-08-08 19:04 GMT+08:00 Peter Zijlstra <pet...@infradead.org>:
> On Tue, Aug 08, 2017 at 06:36:41PM +0800, Yafang Shao wrote:
>> After this change got approved, I will try to make some changes in SysRq.
>
> No, th
key, or
something else).
But in order to introduce the new key, we should made this change first.
After this change got approved, I will try to make some changes in SysRq.
Thanks
Yafang
2017-08-08 18:24 GMT+08:00 Peter Zijlstra <pet...@infradead.org>:
> On Tue, Aug 08, 2017 at 04:50:23PM
2017-08-10 0:42 GMT+08:00 Peter Zijlstra <pet...@infradead.org>:
> On Wed, Aug 09, 2017 at 05:26:14PM +0800, Yafang Shao wrote:
>> 2017-08-09 17:09 GMT+08:00 Peter Zijlstra <pet...@infradead.org>:
>> > On Wed, Aug 09, 2017 at 04:01:49PM +0800, Yafang Shao wrote:
&g
2017-09-18 18:22 GMT+08:00 Jan Kara <j...@suse.cz>:
> On Mon 18-09-17 01:39:28, Yafang Shao wrote:
>> we can find the logic in domain_dirty_limits() that
>> when dirty bg_thresh is bigger than dirty thresh,
>> bg_thresh will be set as thresh * 1 / 2.
>&
ess successfully. This behavior may mislead us.
We'd better do this validity check at the beginning.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
Documentation/sysctl/vm.txt | 5 +++
mm/page-writeback.c | 86 -
2 files changed, 83 inserti
2017-09-19 16:35 GMT+08:00 Jan Kara <j...@suse.cz>:
> On Tue 19-09-17 06:53:00, Yafang Shao wrote:
>> we can find the logic in domain_dirty_limits() that
>> when dirty bg_thresh is bigger than dirty thresh,
>> bg_thresh will be set as thresh * 1 / 2.
>&
2017-09-20 23:33 GMT+08:00 Jan Kara <j...@suse.cz>:
> On Tue 19-09-17 19:48:00, Yafang Shao wrote:
>> 2017-09-19 16:35 GMT+08:00 Jan Kara <j...@suse.cz>:
>> > On Tue 19-09-17 06:53:00, Yafang Shao wrote:
>> >> + if (
ess successfully. This behavior may mislead us.
We'd better do this validity check at the beginning.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
Documentation/sysctl/vm.txt | 6
kernel/sysctl.c | 4 +--
mm/page-writeback.c
tio successfully. This behavior may mislead us.
So we should do this sanity check at the beginning.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
Documentation/sysctl/vm.txt | 5 +++
mm/page-writeback.c | 84 -
2 files changed, 81 inserti
ess successfully. This behavior may mislead us.
We'd better do this validity check at the beginning.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
Documentation/sysctl/vm.txt | 6 +++
mm/page-writeback.c | 92 +
2 files changed, 90 inserti
by writing a non-zero
value to dirty_writeback_centisecs
As it can be disabled by sysctl, it should be able to enable by
sysctl as well.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
mm/page-writeback.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/m
2017-10-10 16:48 GMT+08:00 Jan Kara <j...@suse.cz>:
> On Tue 10-10-17 16:00:29, Yafang Shao wrote:
>> 2017-10-10 6:42 GMT+08:00 Andrew Morton <a...@linux-foundation.org>:
>> > On Sat, 7 Oct 2017 06:58:04 +0800 Yafang Shao <laoar.s...@gmail.com>
>>
2017-10-10 6:42 GMT+08:00 Andrew Morton <a...@linux-foundation.org>:
> On Sat, 7 Oct 2017 06:58:04 +0800 Yafang Shao <laoar.s...@gmail.com> wrote:
>
>> After disable periodic writeback by writing 0 to
>> dirty_writeback_centisecs, the handler wb_workfn() will
threads immediately fixes it.
Cc: Jens Axboe <ax...@kernel.dk>
Cc: Jan Kara <j...@suse.cz>
Cc: Andrew Morton <a...@linux-foundation.org>
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
mm/page-writeback.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(
is triggered.
- When the tunable was set to one hour and is reset to one second, the
new setting will not take effect for up to one hour.
Kicking the flusher threads immediately fixes these issues.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
mm/page-writeback.c | 19
2017-09-26 18:25 GMT+08:00 Michal Hocko <mho...@kernel.org>:
> On Wed 20-09-17 06:43:35, Yafang Shao wrote:
>> we can find the logic in domain_dirty_limits() that
>> when dirty bg_thresh is bigger than dirty thresh,
>> bg_thresh will be set as thresh * 1 / 2.
>&
2017-09-26 19:26 GMT+08:00 Michal Hocko <mho...@kernel.org>:
> On Tue 26-09-17 19:06:37, Yafang Shao wrote:
>> 2017-09-26 18:25 GMT+08:00 Michal Hocko <mho...@kernel.org>:
>> > On Wed 20-09-17 06:43:35, Yafang Shao wrote:
>> >> we can find the logic in d
2017-10-09 19:03 GMT+08:00 Jan Kara <j...@suse.cz>:
> On Mon 09-10-17 18:44:23, Yafang Shao wrote:
>> 2017-10-09 17:56 GMT+08:00 Jan Kara <j...@suse.cz>:
>> > On Sat 07-10-17 06:58:04, Yafang Shao wrote:
>> >> After disable periodic writeback by wr
2017-10-09 17:56 GMT+08:00 Jan Kara <j...@suse.cz>:
> On Sat 07-10-17 06:58:04, Yafang Shao wrote:
>> After disable periodic writeback by writing 0 to
>> dirty_writeback_centisecs, the handler wb_workfn() will not be
>> entered again until the dirty background limit
2017-10-10 17:33 GMT+08:00 Jan Kara <j...@suse.cz>:
> On Tue 10-10-17 17:14:48, Yafang Shao wrote:
>> 2017-10-10 16:48 GMT+08:00 Jan Kara <j...@suse.cz>:
>> > On Tue 10-10-17 16:00:29, Yafang Shao wrote:
>> >> 2017-10-10 6:42 GMT+08:00 Andrew Morton <a
newstate)
When do TCP/IP state transition, we should use these two helpers or use
tcp_set_state() other than assigning a value to sk_state directly.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
v2: test
---
include/net/tcp.h | 2 ++
net/ipv4/inet_connection_sock.
2017-12-05 3:28 GMT+08:00 Marcelo Ricardo Leitner <marcelo.leit...@gmail.com>:
> On Sat, Dec 02, 2017 at 09:36:41AM +0000, Yafang Shao wrote:
>> The TCP/IP transition from TCP_LISTEN to TCP_SYN_RECV and some other
>> transitions are not traced with tcp_set_state tracepoint.
&g
2017-12-13 9:19 GMT+08:00 Song Liu <songliubrav...@fb.com>:
>
>> On Dec 10, 2017, at 7:31 AM, Yafang Shao <laoar.s...@gmail.com> wrote:
>>
>> As sk_state is a common field for struct sock, so the state
>> transition should not be a TCP specific feature.
2017-12-16 6:47 GMT+08:00 Song Liu <songliubrav...@fb.com>:
>
>> On Dec 15, 2017, at 9:56 AM, Yafang Shao <laoar.s...@gmail.com> wrote:
>>
>> As sk_state is a common field for struct sock, so the state
>> transition should not be a TCP specific feature.
TCP_FIN_WAIT2" },
{ 6, "TCP_TIME_WAIT" },
{ 7, "TCP_CLOSE" },
{ 8, "TCP_CLOSE_WAIT" },
{ 9, "TCP_LAST_ACK" },
{ 10, "TCP_LISTEN" },
{ 11, "TCP_CLOSING" },
{ 12, "TCP_NEW_SYN_RECV" })
Signed-off-by: Ste
-by: Yafang Shao <laoar.s...@gmail.com>
---
include/net/sock.h | 15 +-
include/trace/events/sock.h | 106
include/trace/events/tcp.h | 91 --
net/core/sock.c | 13 +
ne
With changes in inet_ files, DCCP state transitions are traced with
sock_set_state tracepoint.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
net/dccp/proto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 9d43c1f..2
n's patch is included in this series.
Steven Rostedt (1):
tcp: Export to userspace the TCP state names for the trace events
Yafang Shao (3):
net: tracepoint: replace tcp_set_state tracepoint with sock_set_state
tracepoint
net: tracepoint: using sock_set_state tracepoint to trace SCTP st
With changes in inet_ files, SCTP state transitions are traced with
sockt_set_state tracepoint.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
net/sctp/endpointola.c | 2 +-
net/sctp/sm_sideeffect.c | 4 ++--
net/sctp/socket.c| 12 ++--
3 files changed, 9 inse
TCP_FIN_WAIT2" },
{ 6, "TCP_TIME_WAIT" },
{ 7, "TCP_CLOSE" },
{ 8, "TCP_CLOSE_WAIT" },
{ 9, "TCP_LAST_ACK" },
{ 10, "TCP_LISTEN" },
{ 11, "TCP_CLOSING" },
{ 12, "TCP_NEW_SYN_RECV" })
Signed-off-by: Ste
With changes in inet_ files, SCTP state transitions are traced with
sockt_set_state tracepoint.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
net/sctp/endpointola.c | 2 +-
net/sctp/sm_sideeffect.c | 4 ++--
net/sctp/socket.c| 12 ++--
3 files changed, 9 inse
is included in this series.
Steven Rostedt:
tcp: Export to userspace the TCP state names for the trace events
Yafang Shao (3):
net: tracepoint: using sock_set_state tracepoint to trace SCTP state
transition
net: tracepoint: replace tcp_set_state tracepoint with sock_set_state
With changes in inet_ files, DCCP state transitions are traced with
sock_set_state tracepoint.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
net/dccp/proto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 9d43c1f..2
2017-12-16 1:43 GMT+08:00 David Miller :
>
> Your Subject line here is incomplete, "replace tcp_set_state
> tracepoint with" what?
Oh Sorry.
The subject should be
"replace tcp_set_state tracepoint with sock_set_state tracepoint"
Thanks
Yafang
-by: Yafang Shao <laoar.s...@gmail.com>
---
include/net/sock.h | 15 +-
include/trace/events/sock.h | 106
include/trace/events/tcp.h | 91 --
net/core/sock.c | 13 +
ne
With changes in inet_ files, DCCP state transitions are traced with
inet_sock_set_state tracepoint.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
net/dccp/proto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 9
TCP_FIN_WAIT2" },
{ 6, "TCP_TIME_WAIT" },
{ 7, "TCP_CLOSE" },
{ 8, "TCP_CLOSE_WAIT" },
{ 9, "TCP_LAST_ACK" },
{ 10, "TCP_LISTEN" },
{ 11, "TCP_CLOSING" },
{ 12, "TCP_NEW_SYN_RECV" })
Signed-off-by: Ste
should be traced, I will modify the
code to trace it.
I just want to make the code easy and not output useless information.
Steven Rostedt (VMware) (1):
tcp: Export to userspace the TCP state names for the trace events
Yafang Shao (4):
net: tracepoint: replace tcp_set_state tracepoint
-by: Yafang Shao <laoar.s...@gmail.com>
---
net/sctp/endpointola.c | 2 +-
net/sctp/sm_sideeffect.c | 4 ++--
net/sctp/socket.c| 12 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index ee1e601..8b31468
not be included in other header files,
so they are defined in sock.c.
The protocol such as SCTP maybe compiled as a ko, hence export
inet_sk_set_state().
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/net/inet_sock.h | 2 +
include/trace/events/sock.h
sk_state_load is only used by AF_INET/AF_INET6, so rename it to
inet_sk_state_load and move it into inet_sock.h.
sk_state_store is removed as it is not used any more.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/net/inet_sock.h | 25 -
i
2017-11-18 0:45 GMT+08:00 Roman Gushchin <g...@fb.com>:
> On Sat, Nov 18, 2017 at 12:20:40AM +0800, Yafang Shao wrote:
>> 2017-11-17 23:55 GMT+08:00 Roman Gushchin <g...@fb.com>:
>> > On Thu, Nov 16, 2017 at 08:43:17PM -0800, Shakeel Butt wrote:
>> >> On
2017-11-17 23:55 GMT+08:00 Roman Gushchin <g...@fb.com>:
> On Thu, Nov 16, 2017 at 08:43:17PM -0800, Shakeel Butt wrote:
>> On Thu, Nov 16, 2017 at 7:09 PM, Yafang Shao <laoar.s...@gmail.com> wrote:
>> > Currently the default tmpfs size is totalram_pages / 2 if mou
2017-11-18 1:35 GMT+08:00 Shakeel Butt <shake...@google.com>:
> On Fri, Nov 17, 2017 at 9:09 AM, Yafang Shao <laoar.s...@gmail.com> wrote:
>> 2017-11-18 0:45 GMT+08:00 Roman Gushchin <g...@fb.com>:
>>> On Sat, Nov 18, 2017 at 12:20:40AM +0800, Yafang Shao wr
2017-11-18 1:49 GMT+08:00 Shakeel Butt <shake...@google.com>:
> On Fri, Nov 17, 2017 at 9:41 AM, Yafang Shao <laoar.s...@gmail.com> wrote:
>> 2017-11-18 1:35 GMT+08:00 Shakeel Butt <shake...@google.com>:
>>> On Fri, Nov 17, 2017 at 9:09 AM, Yafang Shao <laoar
2017-11-11 3:32 GMT+00:00 Steven Rostedt <rost...@goodmis.org>:
> On Sat, 11 Nov 2017 02:06:00 +
> Yafang Shao <laoar.s...@gmail.com> wrote:
>
>> 2017-11-10 15:07 GMT+00:00 Steven Rostedt <rost...@goodmis.org>:
>> > On Fri, 10 Nov 2017 12:56:06 +0
newstate)
When do TCP/IP state transition, we should use these two helpers or use
tcp_set_state() other than assigning a value to sk_state directly.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/net/tcp.h | 2 ++
net/ipv4/inet_connection_sock.c | 6 +++---
ne
2017-11-20 20:39 GMT+08:00 Michal Hocko <mho...@kernel.org>:
> On Mon 20-11-17 20:16:15, Yafang Shao wrote:
>> 2017-11-20 20:04 GMT+08:00 Michal Hocko <mho...@kernel.org>:
>> > On Fri 17-11-17 09:49:54, Shakeel Butt wrote:
>> >> On Fri, Nov 17, 2017 at
2017-11-20 20:04 GMT+08:00 Michal Hocko <mho...@kernel.org>:
> On Fri 17-11-17 09:49:54, Shakeel Butt wrote:
>> On Fri, Nov 17, 2017 at 9:41 AM, Yafang Shao <laoar.s...@gmail.com> wrote:
> [...]
>> > Of couse that is the best way.
>> > But we can not ensu
wap is
off.
So when we mount tmpfs in a memcg, the default size should be limited by
the memcg memory.limit.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/linux/memcontrol.h | 1 +
mm/memcontrol.c| 2 +-
mm/shmem.c | 20 +++-
3 f
2017-11-17 12:43 GMT+08:00 Shakeel Butt <shake...@google.com>:
> On Thu, Nov 16, 2017 at 7:09 PM, Yafang Shao <laoar.s...@gmail.com> wrote:
>> Currently the default tmpfs size is totalram_pages / 2 if mount tmpfs
>> without "-o size=XXX".
>> Whe
2017-11-10 15:07 GMT+00:00 Steven Rostedt <rost...@goodmis.org>:
> On Fri, 10 Nov 2017 12:56:06 +0800
> Yafang Shao <laoar.s...@gmail.com> wrote:
>
>> Could the macro tcp_state_name() be renamed ?
>> If is included in include/net/tcp.h, it will
>
> Ideally,
the whole tcp lifespans with kprobe or ftrace easily.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
net/ipv4/inet_connection_sock.c | 6 +++---
net/ipv4/inet_hashtables.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/inet_connection_sock.c b/ne
When TCP connetion in TCP_TIME_WAIT or TCP_NEW_SYN_RECV state, it can't
get the sport/dport/saddr/daddr from inet_sock.
trace_tcp_set_state may be called when the oldstate in these two states.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/trace/events/tcp.
newstate)
When do TCP/IP state transition, we should use these two helpers or use
tcp_set_state() other than assigning a value to sk_state directly.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/net/tcp.h | 16
net/ipv4/inet_connection_sock.
2017-11-09 22:58 GMT+08:00 Eric Dumazet :
> On Thu, 2017-11-09 at 06:52 -0800, Eric Dumazet wrote:
>
>> Wow.
>>
>>
>> Since all three variants of sockets (full sockets, request sockets,
>> timewait sockets) are all hashed into ehash table these days, they all
>> have the
2017-11-10 8:57 GMT+08:00 Steven Rostedt :
>
> From: "Steven Rostedt (VMware)"
>
> The TCP trace events (specifically tcp_set_state), maps emums to symbol
> names via __print_symbolic(). But this only works for reading trace events
> from the tracefs
2017-11-08 14:51 GMT+08:00 David Miller <da...@davemloft.net>:
> From: Yafang Shao <laoar.s...@gmail.com>
> Date: Tue, 7 Nov 2017 18:36:28 +0800
>
>> When I hooked the function tcp_set_state with kprobe to track the ipv4/tcp
>> state transistion, I found
__sk_state_store(struct sock *sk, int newstate)
When do TCP/IPv4 state transition, we should use these two helpers or
use tcp_set_state() instead of assign a value to sk_state directly.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/net/tcp.h | 16
i
2017-11-09 14:43 GMT+08:00 Alexei Starovoitov <alexei.starovoi...@gmail.com>:
> On Thu, Nov 09, 2017 at 02:01:38PM +0800, Yafang Shao wrote:
>> With this newly introduced TRACE_EVENT, it will be very easy to minotor
>> TCP/IPv4 state transition.
>>
>> A ne
2017-12-08 4:02 GMT+08:00 Marcelo Ricardo Leitner <marcelo.leit...@gmail.com>:
> On Thu, Dec 07, 2017 at 02:10:42PM +0000, Yafang Shao wrote:
>> The TCP/IP transition from TCP_LISTEN to TCP_SYN_RECV and some other
>> transitions are not traced with tcp_set_state tracepoint.
&g
2017-12-08 9:41 GMT+08:00 Yafang Shao <laoar.s...@gmail.com>:
> 2017-12-08 4:02 GMT+08:00 Marcelo Ricardo Leitner <marcelo.leit...@gmail.com>:
>> On Thu, Dec 07, 2017 at 02:10:42PM +, Yafang Shao wrote:
>>> The TCP/IP transition from TCP_LISTEN to TCP_SYN_RECV
2017-12-08 23:42 GMT+08:00 David Miller <da...@davemloft.net>:
> From: Yafang Shao <laoar.s...@gmail.com>
> Date: Fri, 8 Dec 2017 11:40:23 +0800
>
>> It will looks like these,
>>
>> if (sk->sk_protocol == IPPROTO_TCP)
>> _
);
When do TCP/IP state transition, we should use these two helpers or use
tcp_set_state() other than assigning a value to sk_state directly.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
Acked-by: Song Liu <songliubrav...@fb.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.le
2017-12-09 0:28 GMT+08:00 David Miller <da...@davemloft.net>:
> From: Yafang Shao <laoar.s...@gmail.com>
> Date: Fri, 8 Dec 2017 23:50:44 +0800
>
>> 2017-12-08 23:42 GMT+08:00 David Miller <da...@davemloft.net>:
>>> From: Yafang Shao <laoar.s...@gmail.
With changes in inet_ files, SCTP state transitions are traced with
sockt_set_state tracepoint.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
net/sctp/endpointola.c | 2 +-
net/sctp/sm_sideeffect.c | 4 ++--
net/sctp/socket.c| 14 +++---
3 files changed, 10 inse
With changes in inet_ files, DCCP state transitions are traced with
sock_set_state tracepoint.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
net/dccp/proto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index b68168f..9
state);
- void sk_set_state(struct sock *sk, int state);
As trace header should not be included in other header files,
so they are defined in sock.c.
The protocol such as SCTP maybe compiled as a ko, hence export
sk_set_state().
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
inclu
Hi,
According to the discussion in the mail thread
https://patchwork.kernel.org/patch/10099243/,
tcp_set_state tracepoint is renamed to sock_set_state tracepoint and is moved
to include/trace/events/sock.h.
Using this new tracepoint to trace TCP/DCCP/SCTP state transition.
Yafang Shao (3
);
When do TCP/IP state transition, we should use these two helpers or use
tcp_set_state() other than assigning a value to sk_state directly.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
Acked-by: Song Liu <songliubrav...@fb.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.le
);
When do TCP/IP state transition, we should use these two helpers or use
tcp_set_state() other than assigning a value to sk_state directly.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
Acked-by: Song Liu <songliubrav...@fb.com>
---
v2->v3: Per suggestion from Marcelo
skb->len is meaningless to user.
data length could be more helpful, with which we can easily filter out
the packet without payload.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/trace/events/tcp.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
On Sat, May 26, 2018 at 10:25 AM, YueHaibing wrote:
> On 2018/5/26 0:19, Alexei Starovoitov wrote:
>> On Fri, May 25, 2018 at 06:17:57PM +0800, YueHaibing wrote:
>>> gcc-7.3.0 report following err:
>>>
>>> HOSTCC net/bpfilter/main.o
>>> In file included from
skb->len is meaningless to user.
data length could be more helpful, with which we can easily filter out
the packet without payload.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/trace/events/tcp.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
On Tue, May 29, 2018 at 12:36 AM, Eric Dumazet wrote:
> On Mon, May 28, 2018 at 8:36 AM Yafang Shao wrote:
>
>> This is additional to the commit ea1627c20c34 ("tcp: minor optimizations
> around tcp_hdr() usage").
>> At this point, skb->data is same with tcp_h
At this point skb->len is including tcp header length, so it is meaningless
to user. data length could be more helpful, with which we can easily filter
out the packet without payload.
Cc: Eric Dumazet <eduma...@google.com>
Acked-by: Song Liu <songliubrav...@fb.com>
Signed-off-
On Tue, May 29, 2018 at 10:42 PM, Eric Dumazet wrote:
>
>
> On 05/29/2018 07:36 AM, Yafang Shao wrote:
>> On Tue, May 29, 2018 at 10:15 PM, David Miller wrote:
>>> From: Yafang Shao
>>> Date: Fri, 25 May 2018 18:14:05 +0800
>>>
>>>> s
This is additional to the commit ea1627c20c34 ("tcp: minor optimizations around
tcp_hdr() usage").
At this point, skb->data is same with tcp_hdr() as tcp header has not
been pulled yet.
Cc: Eric Dumazet <eduma...@google.com>
Signed-off-by: Yafang Shao <laoar.s...@gm
On Sun, Dec 31, 2017 at 6:33 AM, Brendan Gregg
<brendan.d.gr...@gmail.com> wrote:
> On Tue, Dec 19, 2017 at 7:12 PM, Yafang Shao <laoar.s...@gmail.com> wrote:
>> As sk_state is a common field for struct sock, so the state
>> transition tracepoint should not be a TCP spe
sk->sk_protocol and sk->sk_family are exposed as tracepoint arguments.
Then we can conveniently use these two arguments to do the filter.
Suggested-by: Brendan Gregg <brendan.d.gr...@gmail.com>
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/trace/
as tracepoint arguments.
Suggested-by: Brendan Gregg <brendan.d.gr...@gmail.com>
Suggested-by: Song Liu <songliubrav...@fb.com>
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/trace/events/sock.h | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
di
On Sun, Jan 7, 2018 at 1:46 AM, Song Liu <songliubrav...@fb.com> wrote:
>
>> On Jan 5, 2018, at 12:09 AM, Yafang Shao <laoar.s...@gmail.com> wrote:
>>
>> On Fri, Jan 5, 2018 at 3:21 PM, Song Liu <songliubrav...@fb.com> wrote:
>>>
>>>> On
On Fri, Jan 5, 2018 at 3:21 PM, Song Liu <songliubrav...@fb.com> wrote:
>
>> On Jan 4, 2018, at 10:42 PM, Yafang Shao <laoar.s...@gmail.com> wrote:
>>
>> sk->sk_protocol and sk->sk_family are exposed as tracepoint arguments.
>> Then we can convenie
If net_prio is used, we could also use eBPF programs to attach it,
because the net_prio cgroup could be got with prioidx in struct
sock_cgroup_data.
Hence it should not only be limited to cgroup2.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/linux/cgroup.
If net_prio is used, we could also use eBPF programs to attach it,
because the net_prio cgroup could be got with prioidx in struct
sock_cgroup_data.
Hence it should not only be limited to cgroup2.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/linux/cgroup.
On Thu, Jan 25, 2018 at 11:50 PM, Tejun Heo <t...@kernel.org> wrote:
> On Thu, Jan 25, 2018 at 11:38:48PM +0800, Yafang Shao wrote:
>> If net_prio is used, we could also use eBPF programs to attach it,
>> because the net_prio cgroup could be got with prioidx in struct
>>
TCPF_ macro depends on the definition of TCP_ macro.
So it is better to define them with TCP_ marco.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
include/net/tcp_states.h | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/inclu
sk is already allocated in inet_create/inet6_create, hence when
BPF_CGROUP_RUN_PROG_INET_SOCK is executed sk will never be NULL.
The logic is as bellow,
sk = sk_alloc();
if (!sk)
goto out;
BPF_CGROUP_RUN_PROG_INET_SOCK(sk);
Signed-off-by: Yafang Shao
On Wed, Jan 3, 2018 at 3:46 AM, Brendan Gregg <brendan.d.gr...@gmail.com> wrote:
> On Sat, Dec 30, 2017 at 7:06 PM, Yafang Shao <laoar.s...@gmail.com> wrote:
>> On Sun, Dec 31, 2017 at 6:33 AM, Brendan Gregg
>> <brendan.d.gr...@gmail.com> wrote:
>>> On
the status of all processes, that's a little
expensive.
Hence export the nr_running.
Signed-off-by: Yafang Shao <laoar.s...@gmail.com>
---
kernel/sched/core.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 644fa2e..926575a
1 - 100 of 472 matches
Mail list logo