On Fri, Oct 20, 2023 at 10:51:46PM +0200, Alexander Bluhm wrote:
> On Mon, Oct 16, 2023 at 10:17:50PM +0300, Vitaliy Makkoveev wrote:
> > This socket comes from userland, so this flag is never set. This makes
> > SB_NOINTR flag immutable, because we only set this bit on NFS cl
On Mon, Oct 16, 2023 at 10:17:50PM +0300, Vitaliy Makkoveev wrote:
> This socket comes from userland, so this flag is never set. This makes
> SB_NOINTR flag immutable, because we only set this bit on NFS client
> socket buffers for all it's lifetime.
>
> I want to do this be
> On 13 Oct 2023, at 18:40, Hrvoje Popovski wrote:
>
> On 12.10.2023. 20:10, Vitaliy Makkoveev wrote:
>> Hi, MP safe process timeouts were landed to the tree, so time to test
>> them with network stack :) Diff below makes tdb and ids garbage
>> collector timeout hand
This socket comes from userland, so this flag is never set. This makes
SB_NOINTR flag immutable, because we only set this bit on NFS client
socket buffers for all it's lifetime.
I want to do this because this flag modifies sblock() behaviour and it's
not clean which lock should protect it for
Hi,
MP safe process timeouts were landed to the tree, so time to test them
with network stack :) Diff below makes tdb and ids garbage collector
timeout handlers running without kernel lock.
Not for commit, just share this for tests if someone interesting.
Index: sys/netinet/ip_ipsp.c
On Wed, Oct 11, 2023 at 09:08:33PM -0500, Scott Cheloha wrote:
> On Tue, Oct 10, 2023 at 05:26:14PM +0300, Vitaliy Makkoveev wrote:
> > On Tue, Oct 10, 2023 at 09:06:23AM -0500, Scott Cheloha wrote:
> > > On Fri, Oct 06, 2023 at 03:41:39PM +0200, Alexander Bluhm wrote:
> >
On Tue, Oct 10, 2023 at 09:06:23AM -0500, Scott Cheloha wrote:
> On Fri, Oct 06, 2023 at 03:41:39PM +0200, Alexander Bluhm wrote:
> > On Fri, Oct 06, 2023 at 03:47:31PM +0300, Vitaliy Makkoveev wrote:
> > > On Fri, Oct 06, 2023 at 02:14:52PM +0200, Alexander Bluhm wrote:
&g
`drmread_filtops' conversion is easy, because `event_lock' mutex(9) is
already to protect events list, so use to protect `drmread_filtops' too.
`drm_filtops' is little bit difficult. It only requires to protect
knote(9) data, but it's not clean to me which existing lock to use. I
introduces new
On Fri, Oct 06, 2023 at 02:14:52PM +0200, Alexander Bluhm wrote:
> On Fri, Oct 06, 2023 at 02:12:31PM +0300, Vitaliy Makkoveev wrote:
> > I reworked your diff for a little. At firts I use separate
> > softclock_thread_mpsafe() for mpsafe timers. I don't think we need to
>
On Fri, Oct 06, 2023 at 02:50:21PM +0200, Alexander Bluhm wrote:
> On Fri, Oct 06, 2023 at 12:45:54PM +0300, Vitaliy Makkoveev wrote:
> > On Thu, Oct 05, 2023 at 10:42:25PM +1000, David Gwynne wrote:
> > > > On 5 Oct 2023, at 21:50, Vitaliy Makkoveev wrote:
> >
On Fri, Oct 06, 2023 at 02:14:52PM +0200, Alexander Bluhm wrote:
> > @@ -718,11 +743,13 @@ softclock(void *arg)
> > softclock_process_tick_timeout(to, new);
> > }
> > tostat.tos_softclocks++;
> > - needsproc = !CIRCQ_EMPTY(_proc);
> > - mtx_leave(_mutex);
> > -
> >
On Thu, Oct 05, 2023 at 10:07:24PM +0300, Vitaliy Makkoveev wrote:
> On Thu, Oct 05, 2023 at 11:09:52AM -0500, Scott Cheloha wrote:
> > On Thu, Oct 05, 2023 at 12:57:24AM +0200, Alexander Bluhm wrote:
> > >
> > > This is a first step to unlock TCP syn
n 5 Oct 2023, at 21:50, Vitaliy Makkoveev wrote:
> >
> > Otherwise `if_snd' could still contain packets. If any of them has
> > associated data with bumped reference counter, the corresponding
> > refcnt_finalize() will sleep forever. I don't think we need to
> > tr
ping
> On 27 Sep 2023, at 16:07, Vitaliy Makkoveev wrote:
>
> Introduce `fd_mtx' mutex(9) and use it for `fd_fbufs_in' fuse buffers
> queue and `fd_rklist' knotes list protection.
>
> Index: sys/miscfs/
ping
> On 27 Sep 2023, at 23:19, Vitaliy Makkoveev wrote:
>
> Introduce `sc_mtx` mutex(9) and use it for `sc_frames_ready' and
> `sc_rklist' knotes list protection.
>
> Index: sys/dev/video.c
> ===
> RC
ping
> On 28 Sep 2023, at 14:28, Vitaliy Makkoveev wrote:
>
> On Thu, Sep 28, 2023 at 01:16:17PM +0200, Claudio Jeker wrote:
>> On Thu, Sep 28, 2023 at 01:58:45PM +0300, Vitaliy Makkoveev wrote:
>>> filt_vscsiread() checks `sc_ccb_i2t' protected by `sc_state_m
On Thu, Oct 05, 2023 at 11:09:52AM -0500, Scott Cheloha wrote:
> On Thu, Oct 05, 2023 at 12:57:24AM +0200, Alexander Bluhm wrote:
> >
> > This is a first step to unlock TCP syn cache. The timer function
> > is independent of the socket code. That makes it easy to start
> > there.
> >
> > [...]
Otherwise `if_snd' could still contain packets. If any of them has
associated data with bumped reference counter, the corresponding
refcnt_finalize() will sleep forever. I don't think we need to
transmit these packets when interface became running again.
I don't like this unlocked if_flags check
On Thu, Oct 05, 2023 at 12:08:55AM +0200, Kirill Miazine wrote:
> • Vitaliy Makkoveev [2023-10-05 00:02]:
> > > On 5 Oct 2023, at 00:56, Kirill Miazine wrote:
> > >
> > > new diff doesn't prevent hang in test scenario either.
> > >
> >
> >
> On 5 Oct 2023, at 00:56, Kirill Miazine wrote:
>
> new diff doesn't prevent hang in test scenario either.
>
Which one?
> On 5 Oct 2023, at 00:31, Alexander Bluhm wrote:
>
> On Wed, Oct 04, 2023 at 11:03:27PM +0300, Vitaliy Makkoveev wrote:
>> On Wed, Oct 04, 2023 at 09:13:59PM +0200, Alexander Bluhm wrote:
>>> On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote:
>>>
On Wed, Oct 04, 2023 at 11:07:24PM +0200, Kirill Miazine wrote:
>
>
> • Vitaliy Makkoveev [2023-10-04 22:03]:
> > On Wed, Oct 04, 2023 at 09:13:59PM +0200, Alexander Bluhm wrote:
> > > On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote:
> > > >
On Wed, Oct 04, 2023 at 09:13:59PM +0200, Alexander Bluhm wrote:
> On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote:
> > > If it happns again, could you send an 'ps axlww | grep ifconifg'
> > > output? Then we see the wait channel where it hangs in the kernel.
> > >
> > > $ ps
On Thu, Sep 28, 2023 at 01:16:17PM +0200, Claudio Jeker wrote:
> On Thu, Sep 28, 2023 at 01:58:45PM +0300, Vitaliy Makkoveev wrote:
> > filt_vscsiread() checks `sc_ccb_i2t' protected by `sc_state_mtx'
> > mutex(9), so use it to protect `sc_klist' knotes list too.
> >
>
filt_vscsiread() checks `sc_ccb_i2t' protected by `sc_state_mtx'
mutex(9), so use it to protect `sc_klist' knotes list too.
Tested with iscsid(8).
Index: sys/dev/vscsi.c
===
RCS file: /cvs/src/sys/dev/vscsi.c,v
retrieving revision
Introduce `sc_mtx` mutex(9) and use it for `sc_frames_ready' and
`sc_rklist' knotes list protection.
Index: sys/dev/video.c
===
RCS file: /cvs/src/sys/dev/video.c,v
retrieving revision 1.57
diff -u -p -r1.57 video.c
---
Introduce `fd_mtx' mutex(9) and use it for `fd_fbufs_in' fuse buffers
queue and `fd_rklist' knotes list protection.
Index: sys/miscfs/fuse/fuse_device.c
===
RCS file: /cvs/src/sys/miscfs/fuse/fuse_device.c,v
retrieving revision 1.39
On Tue, Sep 26, 2023 at 10:37:29AM +0200, Alexandre Ratchov wrote:
> On Sun, Sep 24, 2023 at 11:03:54PM +0300, Vitaliy Makkoveev wrote:
> > Please test this diff, I have no midi(4) devices.
> >
> > midi(4) already uses `audio_lock' mutex(9) for filterops, but they are
&g
On Mon, Sep 25, 2023 at 05:39:34AM +, Visa Hankala wrote:
> On Sun, Sep 24, 2023 at 11:03:54PM +0300, Vitaliy Makkoveev wrote:
> > Please test this diff, I have no midi(4) devices.
> >
> > midi(4) already uses `audio_lock' mutex(9) for filterops, but they are
> > st
Please test this diff, I have no midi(4) devices.
midi(4) already uses `audio_lock' mutex(9) for filterops, but they are
still kernel locked. Wipe out old selwakeup API and make them MP safe.
knote_locked(9) will not grab kernel lock, so call it directly from
interrupt handlers instead of
This makes ifnet protection consistent. Execute vmt_tclo_tick() timeout
handler in process context to allow context switch within
vmt_tclo_broadcastip().
Index: sys/dev/pv/vmt.c
===
RCS file: /cvs/src/sys/dev/pv/vmt.c,v
retrieving
`evqueue' is simple circular buffer. Its pretty enough to set head equal
to tail to make it empty.
Index: sys/dev/hotplug.c
===
RCS file: /cvs/src/sys/dev/hotplug.c,v
retrieving revision 1.24
diff -u -p -r1.24 hotplug.c
---
On Fri, Sep 22, 2023 at 12:21:42PM +0900, YASUOKA Masahiko wrote:
> A leak may happens when wgpeer is deleted.
>
> ok?
>
ok mvs@
> The state queue should be freeed when wg_peer is destroyed.
> diff from IIJ.
>
> Index: sys/net/if_wg.c
>
On Mon, Sep 18, 2023 at 02:03:08PM +0300, Vitaliy Makkoveev wrote:
> Also use this mutex to protect `evqueue_head', `evqueue_tail' and
> `evqueue_count'.
>
Sorry, the right diff:
Index: sys/dev/hotplug.c
===
RCS file: /cv
Also use this mutex to protect `evqueue_head', `evqueue_tail' and
`evqueue_count'.
Index: sys/dev/hotplug.c
===
RCS file: /cvs/src/sys/dev/hotplug.c,v
retrieving revision 1.23
diff -u -p -r1.23 hotplug.c
--- sys/dev/hotplug.c 8 Sep
Context switch looks fine here.
Index: sys/dev/pv/hypervic.c
===
RCS file: /cvs/src/sys/dev/pv/hypervic.c,v
retrieving revision 1.19
diff -u -p -r1.19 hypervic.c
--- sys/dev/pv/hypervic.c 11 Apr 2023 00:45:08 - 1.19
On Fri, Sep 15, 2023 at 04:18:13PM +0200, Martin Pieuchot wrote:
> On 11/09/23(Mon) 21:05, Martin Pieuchot wrote:
> > On 06/09/23(Wed) 23:13, Alexander Bluhm wrote:
> > > On Wed, Sep 06, 2023 at 12:23:33PM -0500, Scott Cheloha wrote:
> > > > On Wed, Sep 06, 2023 at 01:04:19PM +0100, Martin
`log_mtx' mutex(9) already used for message buffer protection, so use it
to protect `logread_filtops' too.
ok?
Index: sys/kern/subr_log.c
===
RCS file: /cvs/src/sys/kern/subr_log.c,v
retrieving revision 1.77
diff -u -p -r1.77
Replace selinfo remnants with knote(9) API. Mechanical conversion
because `fuse_rd_filtops' left non MP safe. knote_locked(9) used because
the path covered by kernel lock.
We have some places where selinfo is still used. All of them could be
mechanically converted in this way and obsolete
On Fri, Sep 08, 2023 at 07:39:10PM +0200, Alexander Bluhm wrote:
> On Thu, Sep 07, 2023 at 10:32:58PM +0300, Vitaliy Makkoveev wrote:
> > Remove the remnants of the leftover selinfo from vnode(9) layer. Just
> > mechanical replacement because knote(9) API is already used. I don'
Remove the remnants of the leftover selinfo from vnode(9) layer. Just
mechanical replacement because knote(9) API is already used. I don't
want make klist MP safe with this diff.
headers added where is was required. Disabled tmpsfs was
also tested.
ok?
Index: sys/dev/hotplug.c
> On 4 Sep 2023, at 23:43, Christian Weisgerber wrote:
>
> Alexander Bluhm:
>
>> Variable scs_use is basically counting packet insertions to syn
>> cache, so I would prefer type long to exclude overflow on fast
>> machines. With the current limits int should be enough, but long
>> does not
> On 4 Sep 2023, at 19:52, Alexander Bluhm wrote:
>
> On Mon, Sep 04, 2023 at 07:22:03PM +0300, Vitaliy Makkoveev wrote:
>>> On 4 Sep 2023, at 16:19, Alexander Bluhm wrote:
>>>
>>> Hi,
>>>
>>> Variable scs_use is basically counting pack
> On 4 Sep 2023, at 16:19, Alexander Bluhm wrote:
>
> Hi,
>
> Variable scs_use is basically counting packet insertions to syn
> cache, so I would prefer type long to exclude overflow on fast
> machines. With the current limits int should be enough, but long
> does not hurt.
>
> It can be
> On 3 Sep 2023, at 21:08, Alexander Bluhm wrote:
>
> Hi,
>
> Avoid a useless increment and decrement of of the tcp syn cache
> refcount by unexpanding the SYN_CACHE_TIMER_ARM() macro in the timer
> callback.
>
> ok?
>
ok mvs
> bluhm
>
> Index: netinet/tcp_input.c
>
On Tue, Aug 08, 2023 at 10:40:46PM +0200, Alexander Bluhm wrote:
> On Fri, Aug 04, 2023 at 12:38:23AM +0300, Vitaliy Makkoveev wrote:
> > @@ -1856,6 +1856,9 @@ sosetopt(struct socket *so, int level, i
> > case SO_SNDLOWAT:
> >
The only difference is the socket buffer.
As bonus, in the future solock() will be easily replaced by sblock()
instead pushing it down to each SO_SND* and SO_RCV* case.
Index: sys/kern/uipc_socket.c
===
RCS file:
On Tue, Aug 01, 2023 at 11:24:01AM +0200, Claudio Jeker wrote:
> Now that the issue in inteldrm was resolved we can finally remove this
> old wakeup of the swapper.
>
> OK?
ok mvs
> --
> :wq Claudio
>
> Index: uvm_meter.c
> ===
>
On Mon, Jul 31, 2023 at 10:04:44PM +0200, Claudio Jeker wrote:
> On Mon, Jul 31, 2023 at 09:49:30PM +0200, Claudio Jeker wrote:
> > On Mon, Jul 31, 2023 at 08:03:41PM +0300, Vitaliy Makkoveev wrote:
> > > This is the culprit:
> > >
> > > schedule_
On Mon, Jul 31, 2023 at 09:49:30PM +0200, Claudio Jeker wrote:
> On Mon, Jul 31, 2023 at 08:03:41PM +0300, Vitaliy Makkoveev wrote:
> > This is the culprit:
> >
> > schedule_timeout_uninterruptible(long timeout)
> > {
> > tsleep(curproc, PWAIT, "s
This is the culprit:
schedule_timeout_uninterruptible(long timeout)
{
tsleep(curproc, PWAIT, "schtou", timeout);
return 0;
}
On Sat, Jul 29, 2023 at 11:16:14AM +0200, Claudio Jeker wrote:
> proc0 aka the swapper does not do anything. So there is no need to wake it
> up. Now the problem is that last time this was tried some inteldrm systems
> did hang during bootup because the drm code unexpectedly depended on this
>
On Fri, Jul 21, 2023 at 07:38:17PM +0200, Alexander Bluhm wrote:
> On Thu, Jul 13, 2023 at 02:22:17AM +0300, Vitaliy Makkoveev wrote:
> > This is a part of my standalone sblock() work. I need this movement
> > because buffers related SO_SND* and SO_RCV* socket options modifica
On Thu, Jul 20, 2023 at 09:57:00PM +0200, Alexander Bluhm wrote:
> Hi,
>
> I wonder why UDP echo does not work with inetd on 127.0.0.1.
>
> Note that it is default off. One of my regress machines has it
> enabled for other tests. There perl dist/Net-Ping/t/510_ping_udp.t
> expects that UDP
It contains SS_CANTSENDMORE, SS_ISSENDING, SS_CANTRCVMORE and
SS_RCVATMARK bits. Also do `sb_flags' output as hex, it contains flags
too.
Index: sys/kern/uipc_socket.c
===
RCS file: /cvs/src/sys/kern/uipc_socket.c,v
retrieving
This is a part of my standalone sblock() work. I need this movement
because buffers related SO_SND* and SO_RCV* socket options modification
should be protected with sblock(). However, standalone sblock() has
different lock orders with solock() for receive and send buffers. At
least sblock() for
Use per 'wseventvar' structure `mtx' mutex(9) to protect `put' and `get'
circular buffer indexes together with klist data. Not a big deal, but
Xorg will not kernel lock while polling keyboard and mouse events. Also
removed obsolete selinfo.
Feedback, objections, oks?
Not related to this diff,
> On 9 Jul 2023, at 15:15, Alexander Bluhm wrote:
>
> Hi,
>
> While testing my ART reference couting fix, I discovered a rtentry
> leak that is triggered by regress/sbin/route and detected with
> btrace(8) refcnt.
>
> The reference returned by rtalloc() must be freed with rtfree() in
> all
On Fri, Jul 07, 2023 at 12:31:02PM +0300, YASUOKA Masahiko wrote:
> Hi,
>
> I'd like to expand the counters in struct mbstat from u_short to u_long.
>
> When I was debugging a mbuf leak, I saw the result of "netstat -m"
> ---
> 28647 mbufs in use:
> 28551 mbufs allocated to data
>
On Fri, Jul 07, 2023 at 11:48:13AM +0300, Alexander Bluhm wrote:
> Hi,
>
> When we preserve M_TCP_TSO we also must keep ph_mss. In lo(4)
> LRO/TSO this logic was missing. As this may be relevant only for
> weird pf configs that forward from loopback and ifconfig tcplro is
> disabled by default,
On Tue, Jul 04, 2023 at 03:26:30PM +1000, David Gwynne wrote:
> tl;dr: this adds sec(4) p2p ip interfaces. Traffic in and out of these
> interfaces is protected by IPsec security associations (SAs), but
> there's no flows (security policy database (SPD) entries) associated
> with these SAs. The
On Tue, Jun 27, 2023 at 11:09:32AM +, Klemens Nanni wrote:
> On Tue, Jun 27, 2023 at 01:32:37PM +0300, Vitaliy Makkoveev wrote:
> > M_TEMP seems unreasonable for interface groups data allocations.
>
> After claudio pointed out the wrong type, I thought of the same name,
>
M_TEMP seems unreasonable for interface groups data allocations.
Don't forget to recompile systat(1) and vmstat(8) with new sys/malloc.h.
Index: sys/net/if.c
===
RCS file: /cvs/src/sys/net/if.c,v
retrieving revision 1.700
diff -u -p
> On 22 Jun 2023, at 22:50, Alexander Bluhm wrote:
>
> Hi,
>
> I am working on a diff to run UDP input in parallel. Btrace kstack
> analysis shows that SIP hash for PCB lookup is quite expensive.
> When running in parallel we get lock contention on the PCB table
> mutex.
>
> So it results in
On Wed, Jun 07, 2023 at 01:29:09PM +0200, Alexander Bluhm wrote:
> On Wed, Jun 07, 2023 at 12:59:11PM +0300, Vitaliy Makkoveev wrote:
> > On Wed, Jun 07, 2023 at 10:19:32AM +1000, David Gwynne wrote:
> > >
> > >
> > > > On 7 Jun 2023, at 06:33, Vitaliy M
In this point the interface is already removed from the list of all
interfaces and from the interface index map and all possible
concurrent ioctl() threads finished. Remove this dead code.
Index: sys/net/if.c
===
RCS file:
In this point, the interface is disconnected from everywhere. No need to
hold netlock for dummy 'nd_ifinfo' release. Netlock is also not needed
for TAILQ_EMPTY(>if_*hooks) assertions.
Index: sys/net/if.c
===
RCS file:
On Wed, Jun 07, 2023 at 10:19:32AM +1000, David Gwynne wrote:
>
>
> > On 7 Jun 2023, at 06:33, Vitaliy Makkoveev wrote:
> >
> >> On 6 Jun 2023, at 20:29, Alexander Bluhm wrote:
> >>
> >> On Tue, Jun 06, 2023 at 05:54:31PM +0300, Vitaliy Makkove
> On 6 Jun 2023, at 20:29, Alexander Bluhm wrote:
>
> On Tue, Jun 06, 2023 at 05:54:31PM +0300, Vitaliy Makkoveev wrote:
>> On Tue, Jun 06, 2023 at 02:31:52PM +0200, Alexander Bluhm wrote:
>>> Hi,
>>>
>>> I would suggest to rename ifconfig tcprecvofflo
> On 6 Jun 2023, at 19:37, Chris Cappuccio wrote:
>
> Jan Klemkow [j.klem...@wemelug.de] wrote:
>> On Tue, Jun 06, 2023 at 05:54:31PM +0300, Vitaliy Makkoveev wrote:
>>> On Tue, Jun 06, 2023 at 02:31:52PM +0200, Alexander Bluhm wrote:
>>>> I would sugge
On Tue, Jun 06, 2023 at 02:31:52PM +0200, Alexander Bluhm wrote:
> Hi,
>
> I would suggest to rename ifconfig tcprecvoffload to tcplro. Maybe
> it's just because I had to type that long name too often.
>
> With that we have consistent naming:
> # ifconfig ix0 tcplro
> # sysctl
On Fri, May 26, 2023 at 05:08:06PM +0200, Alexander Bluhm wrote:
> On Fri, May 26, 2023 at 05:29:58PM +0300, Vitaliy Makkoveev wrote:
> > On Wed, May 17, 2023 at 01:02:58PM +0300, Vitaliy Makkoveev wrote:
> > > mrt_rtwalk_mfcsysctl() performs read-only access to
On Wed, May 17, 2023 at 01:08:52PM +0300, Vitaliy Makkoveev wrote:
> Also read-only access to netlock protected data.
>
Regardless on sysctl(2) unlocking backout, the netlock around
mrt_sysctl_vif() could be relaxed to shared netlock.
> Index: sys/netinet/i
On Wed, May 17, 2023 at 01:02:58PM +0300, Vitaliy Makkoveev wrote:
> mrt_rtwalk_mfcsysctl() performs read-only access to protected data, so
> rtable_walk() could be called with shared netlock.
>
Regardless on sysctl(2) unlocking backout, the netlock around
mrt_sysctl_mfc() could b
On Fri, May 26, 2023 at 01:03:13PM +, Klemens Nanni wrote:
> snmpd(8) and 'pfctl -s Interfaces' dump pf's internal list of interfaces.
>
> pf.conf's 'set skip on ifN' and 'pfctl -F all|Reset' set and clear flags,
> PFI_IFLAG_SKIP being the only flag.
>
> (There's no other usage of these
> On 18 May 2023, at 01:14, Alexander Bluhm wrote:
>
> On Wed, May 17, 2023 at 12:46:02PM +0300, Vitaliy Makkoveev wrote:
>> Introduce `ip6_soiikey_lock' rwlock(9) to protect `ip6_soiikey'. It
>> accessed only by ip6_sysctl_soiikey() and ip6_sysctl() is the only
>> ip6
Also read-only access to netlock protected data.
Index: sys/netinet/ip_input.c
===
RCS file: /cvs/src/sys/netinet/ip_input.c,v
retrieving revision 1.384
diff -u -p -r1.384 ip_input.c
--- sys/netinet/ip_input.c 16 May 2023
mrt_rtwalk_mfcsysctl() performs read-only access to protected data, so
rtable_walk() could be called with shared netlock.
Index: sys/netinet/ip_input.c
===
RCS file: /cvs/src/sys/netinet/ip_input.c,v
retrieving revision 1.384
diff -u
Introduce `ip6_soiikey_lock' rwlock(9) to protect `ip6_soiikey'. It
accessed only by ip6_sysctl_soiikey() and ip6_sysctl() is the only
ip6_sysctl_soiikey() caller so context switch is allowed here. Also
remove unused `oldkey' from ip6_sysctl_soiikey().
For IPV6CTL_MRTSTATS, IPV6CTL_MRTMIF and
On Tue, May 16, 2023 at 08:26:37PM +0300, Vitaliy Makkoveev wrote:
> > On 16 May 2023, at 18:35, Alexander Bluhm wrote:
> >
> > I saw one issue in sysctl_niq(). Another CPU could write mq_maxlen
> > and our logic is inconsistent. Below is a fix with read once. Each
> On 16 May 2023, at 18:35, Alexander Bluhm wrote:
>
> I saw one issue in sysctl_niq(). Another CPU could write mq_maxlen
> and our logic is inconsistent. Below is a fix with read once. Each
> CPU detects its own change, last write wins. Or should we protect
> everything with mq_mtx? Then
On Thu, Apr 27, 2023 at 02:54:38PM +0200, Claudio Jeker wrote:
> On Thu, Apr 27, 2023 at 01:55:33PM +0300, Vitaliy Makkoveev wrote:
> > Now only direct netlock used for inet sockets protection. The unlocked
> > access to all other sockets is safe, but we could lost consistency f
Let's start to unlock (*pr_sysctl)() handlers. We have many of them, so
introduce temporary PR_MPSAFE flag to mark MP safe instead of pushing
kernel lock within handlers.
Unlock ip_sysctl(). Still take kernel lock within IPCTL_MRTSTATS case.
It looks like `mrtstat' protection is inconsistent, so
> On 12 May 2023, at 15:07, Alexander Bluhm wrote:
>
> On Fri, May 12, 2023 at 11:43:42AM +, Klemens Nanni wrote:
>>> Access rt_llinfo and check for NULL without checking RTF_LLINFO
>>> flag before. They are changed togehter with the arp or nd6 mutex.
>>
>> It is the same change, but I'd
> On 12 May 2023, at 03:34, David Gwynne wrote:
>
> so in top you see softnet0, softnet1, etc.
>
> the real change is putting a struct softnet in place to wrap the name
> and taskq up with.
>
> ok?
Makes sense. ok mvs
>
> Index: if.c
>
Ping.
> On 21 Apr 2023, at 17:17, Vitaliy Makkoveev wrote:
>
> At least network subset of sysctl(8) MIBs relies on netlock or another
> locks and doesn't require kernel lock. Also some integers in other
> subsets can be read without kernel lock held.
>
> Diff below actual
> On 28 Apr 2023, at 15:38, Alexander Bluhm wrote:
>
> On Fri, Apr 28, 2023 at 02:51:23PM +0300, Vitaliy Makkoveev wrote:
>>> On 28 Apr 2023, at 14:03, Alexander Bluhm wrote:
>>>
>>> That basically means we must never call one of the pool get or put
>&
> On 28 Apr 2023, at 15:57, Vitaliy Makkoveev wrote:
>
> On Fri, Apr 28, 2023 at 02:13:15PM +0200, Alexander Bluhm wrote:
>> After running stress test successfully with this diff, next day
>> machine crashed while compiling a new kernel. It is unclear whether
>>
On Fri, Apr 28, 2023 at 02:13:15PM +0200, Alexander Bluhm wrote:
> After running stress test successfully with this diff, next day
> machine crashed while compiling a new kernel. It is unclear whether
> it is related to the diff. The softdep in ps is problably processing
> make output via ssh.
n
this cpu could happen on any other. IPL_MPFLOOR has very high level and
I guess it was chosen mostly for insurance.
We do rt allocation and release in the sockets, ioctl and softnet
context, so I see no reason to disable interrupts with priority greater
than IPL_SOFTNET.
>
> On Thu, Apr 27, 2
On Thu, Apr 27, 2023 at 02:54:38PM +0200, Claudio Jeker wrote:
> On Thu, Apr 27, 2023 at 01:55:33PM +0300, Vitaliy Makkoveev wrote:
> > Now only direct netlock used for inet sockets protection. The unlocked
> > access to all other sockets is safe, but we could lost consistency f
> On 27 Apr 2023, at 15:40, Alexander Bluhm wrote:
>
> On Thu, Apr 27, 2023 at 03:22:10PM +0300, Vitaliy Makkoveev wrote:
>>> On 27 Apr 2023, at 15:16, Alexander Bluhm wrote:
>>>
>>> On Wed, Apr 26, 2023 at 11:17:37PM +0300, Vitaliy Makkoveev wrote
> On 27 Apr 2023, at 15:16, Alexander Bluhm wrote:
>
> On Wed, Apr 26, 2023 at 11:17:37PM +0300, Vitaliy Makkoveev wrote:
>> Route timers and route labels protected by corresponding mutexes. `ifa'
>> uses references counting for protection. No protection requir
Now only direct netlock used for inet sockets protection. The unlocked
access to all other sockets is safe, but we could lost consistency for a
little. Since the solock() used for sockets protection, make locking
path common and use it. Make it shared because this is read-only access
to sockets
Index: sys/net/route.c
===
RCS file: /cvs/src/sys/net/route.c,v
retrieving revision 1.418
diff -u -p -r1.418 route.c
--- sys/net/route.c 26 Apr 2023 16:09:44 - 1.418
+++ sys/net/route.c 26 Apr 2023 23:00:02 -
@@
Route timers and route labels protected by corresponding mutexes. `ifa'
uses references counting for protection. No protection required for `rt'
passed to rt_mpls_clear() because only current thread owns it.
ok?
Index: sys/net/route.c
> On 26 Apr 2023, at 15:30, Hrvoje Popovski wrote:
>
> On 26.4.2023. 12:15, Alexander Bluhm wrote:
>> On Wed, Apr 26, 2023 at 11:17:32AM +0200, Alexander Bluhm wrote:
>>> On Tue, Apr 25, 2023 at 11:57:09PM +0300, Vitaliy Makkoveev wrote:
>>>> On Tue, Apr 25,
On Tue, Apr 25, 2023 at 11:44:34AM +0200, Alexander Bluhm wrote:
> Hi,
>
> Mutex arp_mtx protects the llinfo_arp la_... fields. So kernel
> lock is only needed for changing the route rt_flags.
>
> Of course there is a race between checking and setting rt_flags.
> But the other checks of the
... and use it to protect route labels storage. This time it is not
clean, which lock protects it because we holding kernel and net locks in
various combinations while accessing it. I see no reason to put kernel
lock to all the places. Also netlock could not be used, because rtfree()
which calls
At least network subset of sysctl(8) MIBs relies on netlock or another
locks and doesn't require kernel lock. Also some integers in other
subsets can be read without kernel lock held.
Diff below actually pushes kernel lock down to net_sysctl(). It is
required for MPLS and PFLOW cases. The
1 - 100 of 774 matches
Mail list logo