Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751717AbbEFLaH (ORCPT ); Wed, 6 May 2015 07:30:07 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:9318 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbbEFLaB (ORCPT ); Wed, 6 May 2015 07:30:01 -0400 X-AuditID: cbfee68d-f79106d00000728c-c7-5549fb374d28 Date: Wed, 06 May 2015 11:29:57 +0000 (GMT) From: Maninder Singh Subject: [EDT][PATCH 1/1] msgsnd use freezable blocking call To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org Cc: "v.narang@samsung.com" Reply-to: maninder1.s@samsung.com MIME-version: 1.0 X-MTR: 20150506103013814@maninder1.s Msgkey: 20150506103013814@maninder1.s X-EPLocale: en_US.windows-1252 X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-MLAttribute: X-RootMTR: 20150506103013814@maninder1.s X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N X-ConfirmMail: N,general Content-type: text/plain; charset=windows-1252 MIME-version: 1.0 Message-id: <1403347040.147731430911797047.JavaMail.weblogic@epmlwas03a> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCIsWRmVeSWpSXmKPExsWyRsSkRtf8t2eowbVl5haXd81hc2D0+LxJ LoAxissmJTUnsyy1SN8ugSvj3ofpjAV/uCvWzTzB2MB4gbuLkZNDSEBNYtHex2wgtoSAicTa t/2sELaYxIV764HiXEA1Sxklbs+czg5TtOL8O0aIxBxGiSnzj4F1sAioSPS9e8cMYrMJ6Euc 3bsOzBYWsJE4N/c92AYRAXeJSTNWMIHYzAKGEh09dxkhrlCUWH/jCZjNKyAocXLmE5YuRg6g ZSoS/+5bQoRVJVa2L4O6QU5iydTLTBA2r8SM9qcsMPFpX9cwQ9jSEudnbWCEeWbx98dQcX6J Y7d3QPUKSEw9c5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IWmfhaQd Wc0CRpZVjKKpBckFxUnpFcZ6xYm5xaV56XrJ+bmbGMFJ6NniHYz/z1sfYhTgYFTi4b0R7Rkq xJpYVlyZe4hRgoNZSYR3ijtQiDclsbIqtSg/vqg0J7X4EKMpMM4mMkuJJucDE2ReSbyhsYm5 qbGphYGhubmZkjjv/3O5IUIC6YklqdmpqQWpRTB9TBycUg2MLiIbJjbfXNWfJeA2dXVTlN/2 4qxVW8T15Jf3HtiS2VO4tfRAyPzvDofcb4iEKe+4fvb9nOXy6c9f/Dg000HjdNsjtSj/zHjx HqFUrQnxB7QlPfZPNr69+qNUjv62Be4dxtsqvjH3FvtpHL32tXlr4/n4PBPGzqBlrx6sW7SV qXjLSoNZf3e6KLEUZyQaajEXFScCABZLqtRYAwAA DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t46BUFPX012461 Content-Length: 1274 Lines: 36 EP-F6AA0618C49C4AEDA73BFF1B39950BAB Hi , Recently shared a patch for using freezable_schedule instead of schedule in msgrcv, and after analysing message queuie implemntation we have realized even msgsnd can also block, if queue is full, So in this scenerio msgsnd sets task state as TASK_INTERRUPTIBLE and can schedule function, similar behaviour as msgrcv. This change is applicable for msgsnd as well. we have created patch for remotes/linux-next/akpm, because msgrcv patch is already applied at this branch. so we didnt include Signed-off-by: Vaneet narang Signed-off-by: Maninder Singh --- ipc/msg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ipc/msg.c b/ipc/msg.c index a7261d5..da5658e 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -674,7 +674,7 @@ long do_msgsnd(int msqid, long mtype, void __user *mtext, ipc_unlock_object(&msq->q_perm); rcu_read_unlock(); - schedule(); + freezable_schedule(); rcu_read_lock(); ipc_lock_object(&msq->q_perm); -- 1.7.1 Thanks and Regards, Maninder Singh????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?