Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932593AbbLNOEF (ORCPT ); Mon, 14 Dec 2015 09:04:05 -0500 Received: from mout.web.de ([212.227.15.4]:51122 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932478AbbLNOEA (ORCPT ); Mon, 14 Dec 2015 09:04:00 -0500 Subject: Re: [PATCH 1/2] zram: Less checks in zram_bvec_write() after error detection To: Sergey Senozhatsky References: <566ABCD9.1060404@users.sourceforge.net> <566B13C1.50907@users.sourceforge.net> <566B14DA.1080709@users.sourceforge.net> <20151214002702.GA718@swordfish> <566E6895.5050603@users.sourceforge.net> <20151214100323.GA16372@swordfish> Cc: LKML , Minchan Kim , Nitin Gupta , kernel-janitors@vger.kernel.org, Julia Lawall , Andrew Morton From: SF Markus Elfring Message-ID: <566ECC45.3050201@users.sourceforge.net> Date: Mon, 14 Dec 2015 15:03:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151214100323.GA16372@swordfish> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:jItgkzLefD0fRkvOS1nQnI1BsBLeTJg4qIOM2ipWR9V+uJIyZLy +sG7WXQiI0ysag1OR08PdKc77cE+VSmYHjq1d3+5YFRXAh1dUUnkOt30x7HScmFGkxd5UdA tEQQJf+dpHuRvrqQ0qRVfxSeoIqQhWSLuIo2ghUVKshklvaAz7ZZy2zLdH1Qhe3B/LVuCkW qZnXG8KwbEi9dnwh+hH3g== X-UI-Out-Filterresults: notjunk:1;V01:K0:BW25LGO5SaM=:uXQd5yg3w+J04kXaPYNaxy kWZfoRDzDQkth5z8Ez0iXyyHjsQTshtGR85/tww/62ub2c9V82rZVcR672ku5NMqTKGTZ5PeD Or9SuWIIDgCX4dPMq09zUolpz5mePeea0nTyLPjm3ZZLuOZmcNOtCdKb79KiobCrkmJvEl71K FzLfYGVCaWCt3qCU6wEYPgFKp+XTv0xuJX4jFJIg0nJ9V3TWkXzbFvIBE+88XdBQZzXMvJd9M hmg3v/TlhC2qeOn5hq0ir+bwCAqn5Y5aLry/eY69NGXnWuEdNtyCmPqkkDE/A7mbX+Vf3dHbP TntrqbJL+Cfv4Jkj3AxZVldc/HrebPYCGAMXmC2cbbgttUP4qcjttzf1FNlq4tbc4AYWdOrQ4 vAcfYfouAwV+Qr09ltLB9FPHfcqMcTJtkM/D/s+I0w2hLj86RRI6sxhdkx3OadX6pVVZr0l0i gMO17AKqYrLfMCJFPyETkBIQmo37TpeGc4TepRTRENVhcMSkSCwKOfzhigYBeu7J/i7SC2d8x zZq31RfRtWobObVbEv8GEyYTaofktBCLwmHGCvAXcAUxNwGz+GJONrceuuSO6TvyPvf+kxC9W dP984fduxXc+tG4VG1+Oygi3vutnXJfyJIElWjFNHAaXZBb9hV5p7nHdq6hwGfJFN8WJ2j3yI hoa/JxsgNRhbx5HvMWDvQOaJu78vPC8/ibL57/Y1i49PrYzFgN4hwfFmsUvYfyBiaowKwrxiz hTP7WO95ts1tZOBt8ROHH0zhwRI1HVlMbKeii0pneotXRqiFhPcTPnAHBXwDJ+w5Tpiyga1X1 uY8AJz3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 767 Lines: 33 >> I suggest to make the affected exception handling a bit more efficient. >> Such source code fine-tuning has got a few special consequences. > > by 'more efficient' you mean saving cpu cycles on 'bvec->bv_len != PAGE_SIZE' > comparison in exception/error path? Yes … > ... > check_strm: > if (zstrm) > zcomp_strm_release(zram->comp, zstrm); > if (is_partial_io(bvec)) { > free_uncmem: > kfree(uncmem); > } > ... I propose to jump over two sanity checks. > no. Thanks for your feedback. Regards, Markus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/