Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Sep 2024 15:49:53 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Dag-Erling =?utf-8?B?U23DuHJncmF2?= <des@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: a52b30ff98cd - main - sys_pipe: consistently use cr_ruidinfo for accounting of pipebuf
Message-ID:  <Zu7A8bFd_cDIUKTD@kib.kiev.ua>
In-Reply-To: <867cb5z2c3.fsf@ltc.des.dev>
References:  <202409202109.48KL9RZ1078677@gitrepo.freebsd.org> <867cb5z2c3.fsf@ltc.des.dev>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 21, 2024 at 01:13:48PM +0200, Dag-Erling Smørgrav wrote:
> Konstantin Belousov <kib@FreeBSD.org> writes:
> > commit a52b30ff98cdab82af140285fa7fcdf1036fef27
> > Author:     Konstantin Belousov <kib@FreeBSD.org>
> > AuthorDate: 2024-09-20 18:48:19 +0000
> > Commit:     Konstantin Belousov <kib@FreeBSD.org>
> > CommitDate: 2024-09-20 21:08:51 +0000
> >
> >     sys_pipe: consistently use cr_ruidinfo for accounting of pipebuf
> >     
> >     Tested by:      yasu
> >     Sponsored by:   The FreeBSD Foundation
> >     MFC after:      1 week
> > ---
> >  sys/kern/sys_pipe.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
> > index 2b81d08f7077..6a5d150423bc 100644
> > --- a/sys/kern/sys_pipe.c
> > +++ b/sys/kern/sys_pipe.c
> > @@ -1677,7 +1677,7 @@ pipe_free_kmem(struct pipe *cpipe)
> >  
> >  	if (cpipe->pipe_buffer.buffer != NULL) {
> >  		atomic_subtract_long(&amountpipekva, cpipe->pipe_buffer.size);
> > -		chgpipecnt(cpipe->pipe_pair->pp_owner->cr_uidinfo,
> > +		chgpipecnt(cpipe->pipe_pair->pp_owner->cr_ruidinfo,
> >  		    -cpipe->pipe_buffer.size, 0);
> >  		vm_map_remove(pipe_map,
> >  		    (vm_offset_t)cpipe->pipe_buffer.buffer,
> 
> This appears to be the opposite of the patch which you posted on
> -current and which yasu@ tested (minus the bit that you committed as
> af96ccc6a508).  That patch replaced cr_ruidinfo with cr_uidinfo in three
> places; this patch replaces cr_uidinfo with cr_ruidinfo somewhere else.

After I realized the cause, I did the initial version of the patch ASAP,
to be able to get the feedback immediately.

Before committing anything, I did a self-review and remembered that I
have did a lot of considerations when implementing swap accounting and
decided that ruid is the right target for charge.

Besides stating the obvious fact above, what do you expect me to answer/
react to your mail?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Zu7A8bFd_cDIUKTD>