[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YXA6NMhwoiIMeHji@bombadil.infradead.org>
Date: Wed, 20 Oct 2021 08:48:04 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: Ming Lei <ming.lei@...hat.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>, tj@...nel.org,
gregkh@...uxfoundation.org, akpm@...ux-foundation.org,
minchan@...nel.org, jeyu@...nel.org, shuah@...nel.org,
bvanassche@....org, dan.j.williams@...el.com, joe@...ches.com,
tglx@...utronix.de, keescook@...omium.org, rostedt@...dmis.org,
linux-spdx@...r.kernel.org, linux-doc@...r.kernel.org,
linux-block@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 11/12] zram: fix crashes with cpu hotplug multistate
On Wed, Oct 20, 2021 at 09:15:20AM +0800, Ming Lei wrote:
> On Tue, Oct 19, 2021 at 12:36:42PM -0700, Luis Chamberlain wrote:
> > On Wed, Oct 20, 2021 at 12:29:53AM +0800, Ming Lei wrote:
> > > diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> > > index d0cae7a42f4d..a14ba3d350ea 100644
> > > --- a/drivers/block/zram/zram_drv.c
> > > +++ b/drivers/block/zram/zram_drv.c
> > > @@ -1704,12 +1704,12 @@ static void zram_reset_device(struct zram *zram)
> > > set_capacity_and_notify(zram->disk, 0);
> > > part_stat_set_all(zram->disk->part0, 0);
> > >
> > > - up_write(&zram->init_lock);
> > > /* I/O operation under all of CPU are done so let's free */
> > > zram_meta_free(zram, disksize);
> > > memset(&zram->stats, 0, sizeof(zram->stats));
> > > zcomp_destroy(comp);
> > > reset_bdev(zram);
> > > + up_write(&zram->init_lock);
> > > }
> > >
> > > static ssize_t disksize_store(struct device *dev,
> >
> > With this, it still ends up in a state where we loop and can't get out of:
> >
> > zram: Can't change algorithm for initialized device
>
> Again, you are running two zram02.sh[1] on /dev/zram0, that isn't unexpected
You mean that it is not expected? If so then yes, of course.
> behavior. Here the difference is just timing.
Right, but that is what helped reproduce a difficutl to re-produce customer
bug. Once you find an easy way to reproduce a reported issue you stick
with it and try to make the situation worse to ensure no more bugs are
present.
> Also you did not answer my question about your test expected result when
> running the following script from two terminal concurrently:
>
> while true; do
> PATH=$PATH:$PWD:$PWD/../../../lib/ ./zram02.sh;
> done
If you run this, you should see no failures.
Once you start a second script that one should cause odd issues on both
sides but never crash or stall the module.
A second series of tests is hitting CTRL-C on either randonly and
restarting testing once again randomly.
Again, neither should crash the kernel or stall the module.
In the end of these tests you should be able to run the script alone
just once and not see issues.
Luis
Powered by blists - more mailing lists