Herbert Xu wrote:
> On Wed, Nov 14, 2007 at 06:30:51PM -0500, Hideo AOKI wrote:
>> +#define SK_DATAGRAM_MEM_QUANTUM ((unsigned int)PAGE_SIZE)
>> +
>> +static inline int sk_datagram_pages(int amt)
>> +{
>> +/* Cast to unsigned as an optimization, since amt is always
>> positive. */
>> +retu
On Wed, Nov 14, 2007 at 06:30:51PM -0500, Hideo AOKI wrote:
>
> +#define SK_DATAGRAM_MEM_QUANTUM ((unsigned int)PAGE_SIZE)
> +
> +static inline int sk_datagram_pages(int amt)
> +{
> + /* Cast to unsigned as an optimization, since amt is always
> positive. */
> + return DIV_ROUND_UP((unsign
Hideo AOKI wrote:
David Miller wrote:
From: Hideo AOKI <[EMAIL PROTECTED]>
Date: Tue, 13 Nov 2007 22:27:13 -0500
Herbert Xu wrote:
On Mon, Oct 29, 2007 at 05:23:10PM -0400, Hideo AOKI wrote:
+#define SK_DATAGRAM_MEM_QUANTUM ((int)PAGE_SIZE)
+
+static inline int sk_datagram_pages(int amt)
+
David Miller wrote:
From: Hideo AOKI <[EMAIL PROTECTED]>
Date: Tue, 13 Nov 2007 22:27:13 -0500
Herbert Xu wrote:
On Mon, Oct 29, 2007 at 05:23:10PM -0400, Hideo AOKI wrote:
+#define SK_DATAGRAM_MEM_QUANTUM ((int)PAGE_SIZE)
+
+static inline int sk_datagram_pages(int amt)
+{
+ return DI
From: Hideo AOKI <[EMAIL PROTECTED]>
Date: Tue, 13 Nov 2007 22:27:13 -0500
> Herbert Xu wrote:
> > On Mon, Oct 29, 2007 at 05:23:10PM -0400, Hideo AOKI wrote:
> >>
> >> +#define SK_DATAGRAM_MEM_QUANTUM ((int)PAGE_SIZE)
> >> +
> >> +static inline int sk_datagram_pages(int amt)
> >> +{
> >> + ret
On Tue, Nov 13, 2007 at 10:27:13PM -0500, Hideo AOKI wrote:
>
> Herbert Xu wrote:
> >>
> >>+#define SK_DATAGRAM_MEM_QUANTUM ((int)PAGE_SIZE)
> >>+
> >>+static inline int sk_datagram_pages(int amt)
> >>+{
> >>+ return DIV_ROUND_UP(amt, SK_DATAGRAM_MEM_QUANTUM);
> >>+}
> >
> >Does this really hav
Hello,
Herbert Xu wrote:
On Mon, Oct 29, 2007 at 05:23:10PM -0400, Hideo AOKI wrote:
+#define SK_DATAGRAM_MEM_QUANTUM ((int)PAGE_SIZE)
+
+static inline int sk_datagram_pages(int amt)
+{
+ return DIV_ROUND_UP(amt, SK_DATAGRAM_MEM_QUANTUM);
+}
Does this really have to be int? Unsigned w
This patch introduces global variable for UDP memory accounting.
The unit is page.
signed-off-by: Satoshi Oshima <[EMAIL PROTECTED]>
signed-off-by: Hideo Aoki <[EMAIL PROTECTED]>
---
include/net/sock.h |7 +++
include/net/udp.h |2 ++
net/ipv4/proc.c|3 ++-
net/ipv4/udp.c
On Mon, Oct 29, 2007 at 05:23:10PM -0400, Hideo AOKI wrote:
>
> +#define SK_DATAGRAM_MEM_QUANTUM ((int)PAGE_SIZE)
> +
> +static inline int sk_datagram_pages(int amt)
> +{
> + return DIV_ROUND_UP(amt, SK_DATAGRAM_MEM_QUANTUM);
> +}
Does this really have to be int? Unsigned would let the compi
This patch introduces global variable for UDP memory accounting.
The unit is page.
--
Hideo Aoki
Hitachi Computer Products (America) Inc.
Signed-off-by: Satoshi Oshima <[EMAIL PROTECTED]>
Signed-off-by: Hideo Aoki <[EMAIL PROTECTED]>
include/net/sock.h |7 +++
include/net/udp.h |2
10 matches
Mail list logo