lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <x4937x6oo8l.fsf@segfault.boston.devel.redhat.com>
Date:	Mon, 19 Oct 2015 11:46:18 -0400
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Ming Lei <ming.lei@...onical.com>
Cc:	Jens Axboe <axboe@...nel.dk>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Ming Lin <ming.l@....samsung.com>,
	Kent Overstreet <kent.overstreet@...il.com>,
	Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH v1 4/6] block: check bio_mergeable() early before merging

Ming Lei <ming.lei@...onical.com> writes:

> On Mon, Oct 19, 2015 at 11:27 PM, Jeff Moyer <jmoyer@...hat.com> wrote:
>> Ming Lei <ming.lei@...onical.com> writes:
>>
>>> After bio splitting is introduced, one bio can be splitted
>>> and it is marked as NOMERGE because it is too fat to be merged,
>>> so check bio_mergeable() earlier to avoid to try to merge it
>>> unnecessarily.
>>>
>>> Signed-off-by: Ming Lei <ming.lei@...onical.com>
>>
>> Reviewed-by: Jeff Moyer <jmoyer@...hat.com>
>>
>> Ming, do you think we should also add a check in blk_attempt_plug_merge?
>
> No, because 'request_count' need to be figured out for automatic flush plug.

Interesting.  See my follow-up to patch 5.  :)

-Jeff

>
> Thanks,
>
>>
>> -Jeff
>>
>>> ---
>>>  block/elevator.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/block/elevator.c b/block/elevator.c
>>> index 84d6394..c3555c9 100644
>>> --- a/block/elevator.c
>>> +++ b/block/elevator.c
>>> @@ -420,7 +420,7 @@ int elv_merge(struct request_queue *q, struct request **req, struct bio *bio)
>>>        *      noxmerges: Only simple one-hit cache try
>>>        *      merges:    All merge tries attempted
>>>        */
>>> -     if (blk_queue_nomerges(q))
>>> +     if (blk_queue_nomerges(q) || !bio_mergeable(bio))
>>>               return ELEVATOR_NO_MERGE;
>>>
>>>       /*
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@...r.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ